Title: [261422] trunk
- Revision
- 261422
- Author
- commit-qu...@webkit.org
- Date
- 2020-05-08 16:11:16 -0700 (Fri, 08 May 2020)
Log Message
TextureMapper should skip clipping a content layer if it's not needed
https://bugs.webkit.org/show_bug.cgi?id=210787
Patch by Tomoki Imai <tomoki.i...@sony.com> on 2020-05-08
Reviewed by Don Olmstead.
Source/WebCore:
This patch follows up r260174.
We don't need to clip a content layer if the clipping rect contains the content rect.
This patch doesn't change the behavior but saves stencil indices.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):
LayoutTests:
This patch follows up r260174 by updating the test expectation.
* platform/gtk/compositing/video/video-object-fit-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (261421 => 261422)
--- trunk/LayoutTests/ChangeLog 2020-05-08 22:56:48 UTC (rev 261421)
+++ trunk/LayoutTests/ChangeLog 2020-05-08 23:11:16 UTC (rev 261422)
@@ -1,3 +1,14 @@
+2020-05-08 Tomoki Imai <tomoki.i...@sony.com>
+
+ TextureMapper should skip clipping a content layer if it's not needed
+ https://bugs.webkit.org/show_bug.cgi?id=210787
+
+ Reviewed by Don Olmstead.
+
+ This patch follows up r260174 by updating the test expectation.
+
+ * platform/gtk/compositing/video/video-object-fit-expected.txt: Added.
+
2020-05-08 Myles C. Maxfield <mmaxfi...@apple.com>
[iOS] Text-style fonts aren't locale-specific
Added: trunk/LayoutTests/platform/gtk/compositing/video/video-object-fit-expected.txt (0 => 261422)
--- trunk/LayoutTests/platform/gtk/compositing/video/video-object-fit-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/gtk/compositing/video/video-object-fit-expected.txt 2020-05-08 23:11:16 UTC (rev 261422)
@@ -0,0 +1,50 @@
+
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 785.00 775.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 775.00)
+ (contentsOpaque 1)
+ (children 6
+ (GraphicsLayer
+ (position 13.00 13.00)
+ (bounds 124.00 204.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 151.00 13.00)
+ (bounds 124.00 204.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 289.00 13.00)
+ (bounds 124.00 204.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 13.00 231.00)
+ (bounds 354.00 304.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 13.00 569.00)
+ (bounds 404.00 184.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 431.00 549.00)
+ (bounds 124.00 204.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Modified: trunk/Source/WebCore/ChangeLog (261421 => 261422)
--- trunk/Source/WebCore/ChangeLog 2020-05-08 22:56:48 UTC (rev 261421)
+++ trunk/Source/WebCore/ChangeLog 2020-05-08 23:11:16 UTC (rev 261422)
@@ -1,3 +1,17 @@
+2020-05-08 Tomoki Imai <tomoki.i...@sony.com>
+
+ TextureMapper should skip clipping a content layer if it's not needed
+ https://bugs.webkit.org/show_bug.cgi?id=210787
+
+ Reviewed by Don Olmstead.
+
+ This patch follows up r260174.
+ We don't need to clip a content layer if the clipping rect contains the content rect.
+ This patch doesn't change the behavior but saves stencil indices.
+
+ * platform/graphics/texmap/TextureMapperLayer.cpp:
+ (WebCore::TextureMapperLayer::paintSelf):
+
2020-05-08 Myles C. Maxfield <mmaxfi...@apple.com>
[iOS] Text-style fonts aren't locale-specific
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (261421 => 261422)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2020-05-08 22:56:48 UTC (rev 261421)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2020-05-08 23:11:16 UTC (rev 261422)
@@ -190,11 +190,17 @@
ASSERT(!layerRect().isEmpty());
- // FIXME: TextureMapper::beginClip doesn't support FloatRoundedRect, so we need to convert m_state.contentsClippingRect to FloatRect.
- options.textureMapper.beginClip(transform, m_state.contentsClippingRect.rect());
+ bool shouldClip = m_state.contentsClippingRect.isRounded() || !m_state.contentsClippingRect.rect().contains(m_state.contentsRect);
+ if (shouldClip) {
+ // FIXME: TextureMapper::beginClip doesn't support FloatRoundedRect, so we need to convert m_state.contentsClippingRect to FloatRect.
+ options.textureMapper.beginClip(transform, m_state.contentsClippingRect.rect());
+ }
+
m_contentsLayer->paintToTextureMapper(options.textureMapper, m_state.contentsRect, transform, options.opacity);
- options.textureMapper.endClip();
+ if (shouldClip)
+ options.textureMapper.endClip();
+
if (m_state.showDebugBorders)
m_contentsLayer->drawBorder(options.textureMapper, m_state.debugBorderColor, m_state.debugBorderWidth, m_state.contentsRect, transform);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes