Title: [213043] trunk/Source/WebCore
Revision
213043
Author
[email protected]
Date
2017-02-27 02:06:28 -0800 (Mon, 27 Feb 2017)

Log Message

[TextureMapper] Remove InterpolationQuality, TextDrawingModeFlags member variables
https://bugs.webkit.org/show_bug.cgi?id=168906

Reviewed by Carlos Garcia Campos.

Remove the InterpolationQuality and TextDrawingModeFlags member variables from the
TextureMapper class. These weren't modified anywhere in the code.

BitmapTexture::updateContents() still sets the image interpolation quality and
drawing mode on the ImageBuffer's GraphicsContext, but now uses the default
InterpolationDefault and TextModeFill values.

* platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::updateContents):
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::TextureMapper): Deleted.
(WebCore::TextureMapper::~TextureMapper): Deleted.
* platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::setImageInterpolationQuality): Deleted.
(WebCore::TextureMapper::setTextDrawingMode): Deleted.
(WebCore::TextureMapper::imageInterpolationQuality): Deleted.
(WebCore::TextureMapper::textDrawingMode): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (213042 => 213043)


--- trunk/Source/WebCore/ChangeLog	2017-02-27 09:49:29 UTC (rev 213042)
+++ trunk/Source/WebCore/ChangeLog	2017-02-27 10:06:28 UTC (rev 213043)
@@ -1,3 +1,28 @@
+2017-02-27  Zan Dobersek  <[email protected]>
+
+        [TextureMapper] Remove InterpolationQuality, TextDrawingModeFlags member variables
+        https://bugs.webkit.org/show_bug.cgi?id=168906
+
+        Reviewed by Carlos Garcia Campos.
+
+        Remove the InterpolationQuality and TextDrawingModeFlags member variables from the
+        TextureMapper class. These weren't modified anywhere in the code.
+
+        BitmapTexture::updateContents() still sets the image interpolation quality and
+        drawing mode on the ImageBuffer's GraphicsContext, but now uses the default
+        InterpolationDefault and TextModeFill values.
+
+        * platform/graphics/texmap/BitmapTexture.cpp:
+        (WebCore::BitmapTexture::updateContents):
+        * platform/graphics/texmap/TextureMapper.cpp:
+        (WebCore::TextureMapper::TextureMapper): Deleted.
+        (WebCore::TextureMapper::~TextureMapper): Deleted.
+        * platform/graphics/texmap/TextureMapper.h:
+        (WebCore::TextureMapper::setImageInterpolationQuality): Deleted.
+        (WebCore::TextureMapper::setTextDrawingMode): Deleted.
+        (WebCore::TextureMapper::imageInterpolationQuality): Deleted.
+        (WebCore::TextureMapper::textDrawingMode): Deleted.
+
 2017-02-26  Zan Dobersek  <[email protected]>
 
         [CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()

Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp (213042 => 213043)


--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp	2017-02-27 09:49:29 UTC (rev 213042)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp	2017-02-27 10:06:28 UTC (rev 213043)
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-void BitmapTexture::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const IntRect& targetRect, const IntPoint& offset, UpdateContentsFlag updateContentsFlag, float scale)
+void BitmapTexture::updateContents(TextureMapper&, GraphicsLayer* sourceLayer, const IntRect& targetRect, const IntPoint& offset, UpdateContentsFlag updateContentsFlag, float scale)
 {
     // Making an unconditionally unaccelerated buffer here is OK because this code
     // isn't used by any platforms that respect the accelerated bit.
@@ -43,8 +43,8 @@
         return;
 
     GraphicsContext& context = imageBuffer->context();
-    context.setImageInterpolationQuality(textureMapper.imageInterpolationQuality());
-    context.setTextDrawingMode(textureMapper.textDrawingMode());
+    context.setImageInterpolationQuality(InterpolationDefault);
+    context.setTextDrawingMode(TextModeFill);
 
     IntRect sourceRect(targetRect);
     sourceRect.setLocation(offset);

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp (213042 => 213043)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp	2017-02-27 09:49:29 UTC (rev 213042)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp	2017-02-27 10:06:28 UTC (rev 213043)
@@ -28,6 +28,10 @@
 
 namespace WebCore {
 
+TextureMapper::TextureMapper() = default;
+
+TextureMapper::~TextureMapper() = default;
+
 PassRefPtr<BitmapTexture> TextureMapper::acquireTextureFromPool(const IntSize& size, const BitmapTexture::Flags flags)
 {
     RefPtr<BitmapTexture> selectedTexture = m_texturePool->acquireTexture(size, flags);
@@ -40,14 +44,4 @@
     return platformCreateAccelerated();
 }
 
-TextureMapper::TextureMapper()
-    : m_interpolationQuality(InterpolationDefault)
-    , m_textDrawingMode(TextModeFill)
-    , m_isMaskMode(false)
-    , m_wrapMode(StretchWrap)
-{ }
-
-TextureMapper::~TextureMapper()
-{ }
-
 } // namespace

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (213042 => 213043)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2017-02-27 09:49:29 UTC (rev 213042)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2017-02-27 10:06:28 UTC (rev 213043)
@@ -21,7 +21,7 @@
 #define TextureMapper_h
 
 #include "BitmapTexture.h"
-#include "GraphicsContext.h"
+#include "Color.h"
 #include "IntRect.h"
 #include "IntSize.h"
 #include "TransformationMatrix.h"
@@ -79,12 +79,6 @@
     virtual IntRect clipBounds() = 0;
     virtual PassRefPtr<BitmapTexture> createTexture() = 0;
 
-    void setImageInterpolationQuality(InterpolationQuality quality) { m_interpolationQuality = quality; }
-    void setTextDrawingMode(TextDrawingModeFlags mode) { m_textDrawingMode = mode; }
-
-    InterpolationQuality imageInterpolationQuality() const { return m_interpolationQuality; }
-    TextDrawingModeFlags textDrawingMode() const { return m_textDrawingMode; }
-
     virtual void beginPainting(PaintFlags = 0) { }
     virtual void endPainting() { }
 
@@ -113,11 +107,9 @@
         return nullptr;
     }
 #endif
-    InterpolationQuality m_interpolationQuality;
-    TextDrawingModeFlags m_textDrawingMode;
-    bool m_isMaskMode;
+    bool m_isMaskMode { false };
     TransformationMatrix m_patternTransform;
-    WrapMode m_wrapMode;
+    WrapMode m_wrapMode { StretchWrap };
 };
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to