Changeset 220400 in webkit


Ignore:
Timestamp:
Aug 8, 2017 6:05:22 AM (7 years ago)
Author:
zandobersek@gmail.com
Message:

[TexMap] Drop GC3D* type usage from TextureMapperPlatformLayer{Buffer,Proxy}
https://bugs.webkit.org/show_bug.cgi?id=175314

Reviewed by Carlos Garcia Campos.

Switch to using OpenGL types in the TextureMapperPlatformLayerBuffer and
TextureMapperPlatformLayerProxy classes, instead of the equivalent GC3D*
types provided in the GraphicsTypes3D.h header.

No new tests -- no change in behavior.

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:

(WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
(WebCore::TextureMapperPlatformLayerBuffer::canReuseWithoutReset):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r220399 r220400  
     12017-08-08  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [TexMap] Drop GC3D* type usage from TextureMapperPlatformLayer{Buffer,Proxy}
     4        https://bugs.webkit.org/show_bug.cgi?id=175314
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Switch to using OpenGL types in the TextureMapperPlatformLayerBuffer and
     9        TextureMapperPlatformLayerProxy classes, instead of the equivalent GC3D*
     10        types provided in the GraphicsTypes3D.h header.
     11
     12        No new tests -- no change in behavior.
     13
     14        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
     15        (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
     16        (WebCore::TextureMapperPlatformLayerBuffer::canReuseWithoutReset):
     17        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
     18        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
     19        (WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):
     20        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
     21
    1222017-08-08  Zan Dobersek  <zdobersek@igalia.com>
    223
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp

    r218170 r220400  
    3939}
    4040
    41 TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize& size, TextureMapperGL::Flags flags, GC3Dint internalFormat)
     41TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize& size, TextureMapperGL::Flags flags, GLint internalFormat)
    4242    : m_textureID(textureID)
    4343    , m_size(size)
     
    4848}
    4949
    50 bool TextureMapperPlatformLayerBuffer::canReuseWithoutReset(const IntSize& size, GC3Dint internalFormat)
     50bool TextureMapperPlatformLayerBuffer::canReuseWithoutReset(const IntSize& size, GLint internalFormat)
    5151{
    52     return m_texture && (m_texture->size() == size) && (static_cast<BitmapTextureGL*>(m_texture.get())->internalFormat() == internalFormat || internalFormat == GraphicsContext3D::DONT_CARE);
     52    return m_texture && (m_texture->size() == size) && (static_cast<BitmapTextureGL*>(m_texture.get())->internalFormat() == internalFormat || internalFormat == GL_DONT_CARE);
    5353}
    5454
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h

    r218170 r220400  
    2727
    2828#include "BitmapTextureGL.h"
    29 #include "GraphicsTypes3D.h"
     29#include "TextureMapperGLHeaders.h"
    3030#include "TextureMapperPlatformLayer.h"
    3131#include <wtf/CurrentTime.h>
     
    4040public:
    4141    TextureMapperPlatformLayerBuffer(RefPtr<BitmapTexture>&&, TextureMapperGL::Flags = 0);
    42     TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize&, TextureMapperGL::Flags, GC3Dint internalFormat);
     42    TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize&, TextureMapperGL::Flags, GLint internalFormat);
    4343
    4444    virtual ~TextureMapperPlatformLayerBuffer() = default;
     
    4646    void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) final;
    4747
    48     bool canReuseWithoutReset(const IntSize&, GC3Dint internalFormat);
     48    bool canReuseWithoutReset(const IntSize&, GLint internalFormat);
    4949    BitmapTextureGL& textureGL() { return static_cast<BitmapTextureGL&>(*m_texture); }
    5050
     
    7373    GLuint m_textureID;
    7474    IntSize m_size;
    75     GC3Dint m_internalFormat;
     75    GLint m_internalFormat;
    7676    TextureMapperGL::Flags m_extraFlags;
    7777    bool m_hasManagedTexture;
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp

    r218170 r220400  
    118118}
    119119
    120 std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerProxy::getAvailableBuffer(const IntSize& size, GC3Dint internalFormat)
     120std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerProxy::getAvailableBuffer(const IntSize& size, GLint internalFormat)
    121121{
    122122    ASSERT(m_lock.isHeld());
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h

    r220397 r220400  
    2929#if USE(COORDINATED_GRAPHICS_THREADED)
    3030
    31 #include "GraphicsTypes3D.h"
     31#include "TextureMapperGLHeaders.h"
    3232#include <wtf/Function.h>
    3333#include <wtf/Lock.h>
     
    6363    // aquire / release the lock explicitly to use below methods.
    6464    Lock& lock() { return m_lock; }
    65     std::unique_ptr<TextureMapperPlatformLayerBuffer> getAvailableBuffer(const IntSize&, GC3Dint internalFormat);
     65    std::unique_ptr<TextureMapperPlatformLayerBuffer> getAvailableBuffer(const IntSize&, GLint internalFormat);
    6666    void pushNextBuffer(std::unique_ptr<TextureMapperPlatformLayerBuffer>);
    6767    bool isActive();
Note: See TracChangeset for help on using the changeset viewer.