Title: [268280] trunk/Source/WebCore
Revision
268280
Author
[email protected]
Date
2020-10-09 12:51:11 -0700 (Fri, 09 Oct 2020)

Log Message

[WinCairo][GraphicsLayerTextureMapper] Image layers are entirely clipped since r260174
https://bugs.webkit.org/show_bug.cgi?id=217507

Reviewed by Don Olmstead.

r260174 added contentsClippingRect to TextureMapperLayer::State to
clip the content. However, it implemented setContentsClippingRect
only for CoordinatedGraphicsLayer but for
GraphicsLayerTextureMapper. Because the initial value of
contentsClippingRect is empty, entire image layers are clipped in
GraphicsLayerTextureMapper.

Existing compositing/images tests covers this change, but WinCairo
DRT and WTR don't support pixel dump in AC mode at the moment (Bug 215041).

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsClippingRect): Added.
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (268279 => 268280)


--- trunk/Source/WebCore/ChangeLog	2020-10-09 19:49:08 UTC (rev 268279)
+++ trunk/Source/WebCore/ChangeLog	2020-10-09 19:51:11 UTC (rev 268280)
@@ -1,3 +1,25 @@
+2020-10-09  Fujii Hironori  <[email protected]>
+
+        [WinCairo][GraphicsLayerTextureMapper] Image layers are entirely clipped since r260174
+        https://bugs.webkit.org/show_bug.cgi?id=217507
+
+        Reviewed by Don Olmstead.
+
+        r260174 added contentsClippingRect to TextureMapperLayer::State to
+        clip the content. However, it implemented setContentsClippingRect
+        only for CoordinatedGraphicsLayer but for
+        GraphicsLayerTextureMapper. Because the initial value of
+        contentsClippingRect is empty, entire image layers are clipped in
+        GraphicsLayerTextureMapper.
+
+        Existing compositing/images tests covers this change, but WinCairo
+        DRT and WTR don't support pixel dump in AC mode at the moment (Bug 215041).
+
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayerTextureMapper::setContentsClippingRect): Added.
+        (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+
 2020-10-09  Aditya Keerthi  <[email protected]>
 
         [macOS] Add editability to input type=month

Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (268279 => 268280)


--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp	2020-10-09 19:49:08 UTC (rev 268279)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp	2020-10-09 19:51:11 UTC (rev 268280)
@@ -272,6 +272,15 @@
     notifyChange(ContentsRectChange);
 }
 
+void GraphicsLayerTextureMapper::setContentsClippingRect(const FloatRoundedRect& rect)
+{
+    if (rect == m_contentsClippingRect)
+        return;
+
+    GraphicsLayer::setContentsClippingRect(rect);
+    notifyChange(ContentsRectChange);
+}
+
 void GraphicsLayerTextureMapper::setContentsToSolidColor(const Color& color)
 {
     if (color == m_solidColor)
@@ -425,8 +434,10 @@
     if (m_changeMask & Preserves3DChange)
         m_layer.setPreserves3D(preserves3D());
 
-    if (m_changeMask & ContentsRectChange)
+    if (m_changeMask & ContentsRectChange) {
         m_layer.setContentsRect(contentsRect());
+        m_layer.setContentsClippingRect(contentsClippingRect());
+    }
 
     if (m_changeMask & MasksToBoundsChange)
         m_layer.setMasksToBounds(masksToBounds());

Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (268279 => 268280)


--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h	2020-10-09 19:49:08 UTC (rev 268279)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h	2020-10-09 19:51:11 UTC (rev 268280)
@@ -66,6 +66,7 @@
     void setNeedsDisplayInRect(const FloatRect&, ShouldClipToLayer = ClipToLayer) override;
     void setContentsNeedsDisplay() override;
     void setContentsRect(const FloatRect&) override;
+    void setContentsClippingRect(const FloatRoundedRect&) override;
 
     bool addAnimation(const KeyframeValueList&, const FloatSize&, const Animation*, const String&, double) override;
     void pauseAnimation(const String&, double) override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to