Title: [121136] trunk/Source/WebCore
- Revision
- 121136
- Author
- [email protected]
- Date
- 2012-06-24 20:40:09 -0700 (Sun, 24 Jun 2012)
Log Message
[Texmap] Minor cleanup for TextureMapper::accelerationMode()
https://bugs.webkit.org/show_bug.cgi?id=89825
Patch by Simon Hausmann <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121135 => 121136)
--- trunk/Source/WebCore/ChangeLog 2012-06-25 03:32:21 UTC (rev 121135)
+++ trunk/Source/WebCore/ChangeLog 2012-06-25 03:40:09 UTC (rev 121136)
@@ -1,3 +1,22 @@
+2012-06-24 Simon Hausmann <[email protected]>
+
+ [Texmap] Minor cleanup for TextureMapper::accelerationMode()
+ https://bugs.webkit.org/show_bug.cgi?id=89825
+
+ 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):
+
2012-06-24 Mike Lawther <[email protected]>
CSS3 calc: transitions starting and ending with a calc _expression_ move to end state
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (121135 => 121136)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h 2012-06-25 03:32:21 UTC (rev 121135)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h 2012-06-25 03:40:09 UTC (rev 121136)
@@ -128,7 +128,7 @@
InterpolationQuality imageInterpolationQuality() const { return m_interpolationQuality; }
TextDrawingModeFlags textDrawingMode() const { return m_textDrawingMode; }
- virtual AccelerationMode accelerationMode() const = 0;
+ AccelerationMode accelerationMode() const { return m_accelerationMode; }
virtual void beginPainting(PaintFlags flags = 0) { }
virtual void endPainting() { }
@@ -139,9 +139,10 @@
virtual PassRefPtr<BitmapTexture> acquireTextureFromPool(const IntSize&);
protected:
- TextureMapper()
+ TextureMapper(AccelerationMode accelerationMode)
: m_interpolationQuality(InterpolationDefault)
, m_textDrawingMode(TextModeFill)
+ , m_accelerationMode(accelerationMode)
{}
private:
@@ -157,6 +158,7 @@
TextDrawingModeFlags m_textDrawingMode;
Vector<RefPtr<BitmapTexture> > m_texturePool;
GraphicsContext* m_context;
+ AccelerationMode m_accelerationMode;
};
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (121135 => 121136)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2012-06-25 03:32:21 UTC (rev 121135)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2012-06-25 03:40:09 UTC (rev 121136)
@@ -239,7 +239,8 @@
}
TextureMapperGL::TextureMapperGL()
- : m_data(new TextureMapperGLData)
+ : TextureMapper(OpenGLMode)
+ , m_data(new TextureMapperGLData)
, m_context(0)
{
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h (121135 => 121136)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h 2012-06-25 03:32:21 UTC (rev 121135)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h 2012-06-25 03:40:09 UTC (rev 121136)
@@ -63,7 +63,6 @@
virtual IntSize maxTextureSize() const OVERRIDE { return IntSize(2000, 2000); }
virtual PassRefPtr<BitmapTexture> createTexture() OVERRIDE;
virtual GraphicsContext* graphicsContext() OVERRIDE { return m_context; }
- virtual AccelerationMode accelerationMode() const OVERRIDE { return OpenGLMode; }
virtual void setGraphicsContext(GraphicsContext* context) OVERRIDE { m_context = context; }
#if ENABLE(CSS_FILTERS)
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h (121135 => 121136)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h 2012-06-25 03:32:21 UTC (rev 121135)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h 2012-06-25 03:40:09 UTC (rev 121136)
@@ -57,7 +57,6 @@
virtual void bindSurface(BitmapTexture* surface) OVERRIDE { m_currentSurface = surface;}
virtual void endClip() OVERRIDE { graphicsContext()->restore(); }
virtual PassRefPtr<BitmapTexture> createTexture() OVERRIDE { return BitmapTextureImageBuffer::create(); }
- virtual AccelerationMode accelerationMode() const OVERRIDE { return SoftwareMode; }
inline GraphicsContext* currentContext()
{
@@ -65,6 +64,9 @@
}
private:
+ TextureMapperImageBuffer()
+ : TextureMapper(SoftwareMode)
+ { }
RefPtr<BitmapTexture> m_currentSurface;
};
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes