⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 121136 in webkit


Ignore:
Timestamp:
Jun 24, 2012, 8:40:09 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

[Texmap] Minor cleanup for TextureMapper::accelerationMode()
https://bugs.webkit.org/show_bug.cgi?id=89825

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-06-24
Reviewed by Kenneth Rohde Christiansen.

Replace the virtual method with a simple member variable.

  • platform/graphics/texmap/TextureMapper.h:

(WebCore::TextureMapper::accelerationMode):
(WebCore::TextureMapper::TextureMapper):
(TextureMapper):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::TextureMapperGL):

  • platform/graphics/texmap/TextureMapperGL.h:
  • platform/graphics/texmap/TextureMapperImageBuffer.h:

(WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121132 r121136  
     12012-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        [Texmap] Minor cleanup for TextureMapper::accelerationMode()
     4        https://bugs.webkit.org/show_bug.cgi?id=89825
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Replace the virtual method with a simple member variable.
     9
     10        * platform/graphics/texmap/TextureMapper.h:
     11        (WebCore::TextureMapper::accelerationMode):
     12        (WebCore::TextureMapper::TextureMapper):
     13        (TextureMapper):
     14        * platform/graphics/texmap/TextureMapperGL.cpp:
     15        (WebCore::TextureMapperGL::TextureMapperGL):
     16        * platform/graphics/texmap/TextureMapperGL.h:
     17        * platform/graphics/texmap/TextureMapperImageBuffer.h:
     18        (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
     19
    1202012-06-24  Mike Lawther  <mikelawther@chromium.org>
    221
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h

    r119098 r121136  
    129129    InterpolationQuality imageInterpolationQuality() const { return m_interpolationQuality; }
    130130    TextDrawingModeFlags textDrawingMode() const { return m_textDrawingMode; }
    131     virtual AccelerationMode accelerationMode() const = 0;
     131    AccelerationMode accelerationMode() const { return m_accelerationMode; }
    132132
    133133    virtual void beginPainting(PaintFlags flags = 0) { }
     
    140140
    141141protected:
    142     TextureMapper()
     142    TextureMapper(AccelerationMode accelerationMode)
    143143        : m_interpolationQuality(InterpolationDefault)
    144144        , m_textDrawingMode(TextModeFill)
     145        , m_accelerationMode(accelerationMode)
    145146    {}
    146147
     
    158159    Vector<RefPtr<BitmapTexture> > m_texturePool;
    159160    GraphicsContext* m_context;
     161    AccelerationMode m_accelerationMode;
    160162};
    161163
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

    r120608 r121136  
    240240
    241241TextureMapperGL::TextureMapperGL()
    242     : m_data(new TextureMapperGLData)
     242    : TextureMapper(OpenGLMode)
     243    , m_data(new TextureMapperGLData)
    243244    , m_context(0)
    244245{
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h

    r119849 r121136  
    6464    virtual PassRefPtr<BitmapTexture> createTexture() OVERRIDE;
    6565    virtual GraphicsContext* graphicsContext() OVERRIDE { return m_context; }
    66     virtual AccelerationMode accelerationMode() const OVERRIDE { return OpenGLMode; }
    6766    virtual void setGraphicsContext(GraphicsContext* context) OVERRIDE { m_context = context; }
    6867
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h

    r116834 r121136  
    5858    virtual void endClip() OVERRIDE { graphicsContext()->restore(); }
    5959    virtual PassRefPtr<BitmapTexture> createTexture() OVERRIDE { return BitmapTextureImageBuffer::create(); }
    60     virtual AccelerationMode accelerationMode() const OVERRIDE { return SoftwareMode; }
    6160
    6261    inline GraphicsContext* currentContext()
     
    6665
    6766private:
     67    TextureMapperImageBuffer()
     68        : TextureMapper(SoftwareMode)
     69    { }
    6870    RefPtr<BitmapTexture> m_currentSurface;
    6971};
Note: See TracChangeset for help on using the changeset viewer.