Title: [116203] trunk/Source/WebCore
- Revision
- 116203
- Author
- [email protected]
- Date
- 2012-05-04 19:17:15 -0700 (Fri, 04 May 2012)
Log Message
Leaf non self-painting layers should bail out early in RenderLayer::paintLayer
https://bugs.webkit.org/show_bug.cgi?id=85678
Reviewed by Darin Adler.
Performance optimization, no expected change in behavior.
The gist of the change is that leaf non self-painting layers don't need to be painted as their
associated RenderBoxModelObject should properly paint itself without any help.
For RenderLayer trees that have a large number of leafs nodes (like a table with a leaf RenderLayer for
each cells), not bailing out is a big overhead as it ends up doing a lot of computation for no real
painting. See http://dglazkov.github.com/performance-tests/biggrid.html for a benchmark for that. On
my machine, it reduces the paint time when scrolling to 70ms from 120ms (45% speedup).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (116202 => 116203)
--- trunk/Source/WebCore/ChangeLog 2012-05-05 01:43:28 UTC (rev 116202)
+++ trunk/Source/WebCore/ChangeLog 2012-05-05 02:17:15 UTC (rev 116203)
@@ -1,3 +1,23 @@
+2012-05-04 Julien Chaffraix <[email protected]>
+
+ Leaf non self-painting layers should bail out early in RenderLayer::paintLayer
+ https://bugs.webkit.org/show_bug.cgi?id=85678
+
+ Reviewed by Darin Adler.
+
+ Performance optimization, no expected change in behavior.
+
+ The gist of the change is that leaf non self-painting layers don't need to be painted as their
+ associated RenderBoxModelObject should properly paint itself without any help.
+
+ For RenderLayer trees that have a large number of leafs nodes (like a table with a leaf RenderLayer for
+ each cells), not bailing out is a big overhead as it ends up doing a lot of computation for no real
+ painting. See http://dglazkov.github.com/performance-tests/biggrid.html for a benchmark for that. On
+ my machine, it reduces the paint time when scrolling to 70ms from 120ms (45% speedup).
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+
2012-05-04 Rob Buis <[email protected]>
Remove InlineBox::next()
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (116202 => 116203)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-05-05 01:43:28 UTC (rev 116202)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-05-05 02:17:15 UTC (rev 116203)
@@ -2900,6 +2900,10 @@
if (!renderer()->opacity())
return;
+ // Non self-painting leaf layers don't need to be painted as their renderer() should properly paint itself.
+ if (!isSelfPaintingLayer() && !firstChild())
+ return;
+
if (paintsWithTransparency(paintBehavior))
paintFlags |= PaintLayerHaveTransparency;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes