Title: [226521] trunk
- Revision
- 226521
- Author
- [email protected]
- Date
- 2018-01-08 10:47:26 -0800 (Mon, 08 Jan 2018)
Log Message
REGRESSION (r219145): Toggling layer borders on a static document no longer works immediately
https://bugs.webkit.org/show_bug.cgi?id=176260
<rdar://problem/34219966>
Reviewed by Simon Fraser.
Source/WebCore:
Optimization reveled bugs in debug indicator painting.
Test: compositing/debug-borders-dynamic.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateDebugIndicators):
(WebCore::GraphicsLayerCA::updateDebugBorder): Deleted.
- Rename to indicate this is not just about debug borders.
- Trigger display so repaint counters get painted. This helper is only called when the indicators change.
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
Ensure we do compositing update on debug border change even when there is no layout.
LayoutTests:
* compositing/debug-borders-dynamic-expected.html: Added.
* compositing/debug-borders-dynamic.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (226520 => 226521)
--- trunk/LayoutTests/ChangeLog 2018-01-08 18:38:31 UTC (rev 226520)
+++ trunk/LayoutTests/ChangeLog 2018-01-08 18:47:26 UTC (rev 226521)
@@ -1,3 +1,14 @@
+2018-01-08 Antti Koivisto <[email protected]>
+
+ REGRESSION (r219145): Toggling layer borders on a static document no longer works immediately
+ https://bugs.webkit.org/show_bug.cgi?id=176260
+ <rdar://problem/34219966>
+
+ Reviewed by Simon Fraser.
+
+ * compositing/debug-borders-dynamic-expected.html: Added.
+ * compositing/debug-borders-dynamic.html: Added.
+
2018-01-08 Yacine Bandou <[email protected]>
[EME] Add layout test for InitData and InitDataType in CENC encrypted event
Added: trunk/LayoutTests/compositing/debug-borders-dynamic-expected.html (0 => 226521)
--- trunk/LayoutTests/compositing/debug-borders-dynamic-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/debug-borders-dynamic-expected.html 2018-01-08 18:47:26 UTC (rev 226521)
@@ -0,0 +1,7 @@
+<script>
+if (window.internals) {
+ internals.settings.setShowRepaintCounter(true);
+ internals.settings.setShowDebugBorders(true);
+}
+</script>
+<div style="border:2px solid red; width:100px; height:100px; will-change:transform"></div>
Added: trunk/LayoutTests/compositing/debug-borders-dynamic.html (0 => 226521)
--- trunk/LayoutTests/compositing/debug-borders-dynamic.html (rev 0)
+++ trunk/LayoutTests/compositing/debug-borders-dynamic.html 2018-01-08 18:47:26 UTC (rev 226521)
@@ -0,0 +1,8 @@
+<div style="border:2px solid red; width:100px; height:100px; will-change:transform"></div>
+<script>
+document.body.offsetLeft;
+if (window.internals) {
+ internals.settings.setShowRepaintCounter(true);
+ internals.settings.setShowDebugBorders(true);
+}
+</script>
Modified: trunk/Source/WebCore/ChangeLog (226520 => 226521)
--- trunk/Source/WebCore/ChangeLog 2018-01-08 18:38:31 UTC (rev 226520)
+++ trunk/Source/WebCore/ChangeLog 2018-01-08 18:47:26 UTC (rev 226521)
@@ -1,3 +1,29 @@
+2018-01-08 Antti Koivisto <[email protected]>
+
+ REGRESSION (r219145): Toggling layer borders on a static document no longer works immediately
+ https://bugs.webkit.org/show_bug.cgi?id=176260
+ <rdar://problem/34219966>
+
+ Reviewed by Simon Fraser.
+
+ Optimization reveled bugs in debug indicator painting.
+
+ Test: compositing/debug-borders-dynamic.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
+ (WebCore::GraphicsLayerCA::updateDebugIndicators):
+ (WebCore::GraphicsLayerCA::updateDebugBorder): Deleted.
+
+ - Rename to indicate this is not just about debug borders.
+ - Trigger display so repaint counters get painted. This helper is only called when the indicators change.
+
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
+
+ Ensure we do compositing update on debug border change even when there is no layout.
+
2018-01-08 Zalan Bujtas <[email protected]>
[RenderTreeBuilder] Move RenderInline addChild logic to RenderTreeBuilder
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (226520 => 226521)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2018-01-08 18:38:31 UTC (rev 226520)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2018-01-08 18:47:26 UTC (rev 226521)
@@ -1793,7 +1793,7 @@
updateSupportsSubpixelAntialiasedText();
if (m_uncommittedChanges & DebugIndicatorsChanged)
- updateDebugBorder();
+ updateDebugIndicators();
if (m_uncommittedChanges & CustomAppearanceChanged)
updateCustomAppearance();
@@ -2351,7 +2351,7 @@
return showingBorders ? Color(255, 122, 251) : Color();
}
-void GraphicsLayerCA::updateDebugBorder()
+void GraphicsLayerCA::updateDebugIndicators()
{
Color borderColor;
float width = 0;
@@ -2360,6 +2360,9 @@
if (showDebugBorders)
getDebugBorderInfo(borderColor, width);
+ // Paint repaint counter.
+ m_layer->setNeedsDisplay();
+
setLayerDebugBorder(*m_layer, borderColor, width);
if (m_contentsLayer)
setLayerDebugBorder(*m_contentsLayer, contentsLayerDebugBorderColor(showDebugBorders), contentsLayerBorderWidth);
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (226520 => 226521)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2018-01-08 18:38:31 UTC (rev 226520)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2018-01-08 18:47:26 UTC (rev 226521)
@@ -414,7 +414,7 @@
void updateContentsNeedsDisplay();
void updateAcceleratesDrawing();
void updateSupportsSubpixelAntialiasedText();
- void updateDebugBorder();
+ void updateDebugIndicators();
void updateTiles();
void updateContentsScale(float pageScaleFactor);
void updateCustomAppearance();
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (226520 => 226521)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2018-01-08 18:38:31 UTC (rev 226520)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2018-01-08 18:47:26 UTC (rev 226521)
@@ -320,8 +320,10 @@
if (isMainFrameCompositor())
forceCompositingMode = m_renderView.settings().forceCompositingMode() && hasAcceleratedCompositing;
- if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode)
+ if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode) {
setCompositingLayersNeedRebuild();
+ m_layerNeedsCompositingUpdate = true;
+ }
bool debugBordersChanged = m_showDebugBorders != showDebugBorders;
m_hasAcceleratedCompositing = hasAcceleratedCompositing;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes