Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 202683005: optimizing layout performance when only transform3d matrix changed by Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderObject.cpp
===================================================================
--- Source/core/rendering/RenderObject.cpp (revision 169401)
+++ Source/core/rendering/RenderObject.cpp (working copy)
@@ -1826,8 +1826,11 @@
diff = StyleDifferenceSimplifiedLayout;
else if (diff < StyleDifferenceSimplifiedLayout)
diff = StyleDifferenceSimplifiedLayoutAndPositionedMovement;
- } else if (diff < StyleDifferenceRecompositeLayer)
- diff = StyleDifferenceRecompositeLayer;
+ } else if (diff < StyleDifferenceRecompositeLayer) {
+ if (diff <= StyleDifferenceRecompositeLayer && (contextSensitiveProperties & ContextSensitivePropertyTransform3D))
+ diff = StyleDifferenceMinRecompositeLayer;
+ }
+
}
// If opacity or filters changed, and the layer does not paint into its own separate backing, then we need to repaint (also
@@ -1836,7 +1839,7 @@
if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer()->hasDirectReasonsForCompositing()))
diff = StyleDifferenceRepaintLayer;
else if (diff < StyleDifferenceRecompositeLayer)
- diff = StyleDifferenceRecompositeLayer;
+ diff = StyleDifferenceMinRecompositeLayer;
}
if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLayer() && diff <= StyleDifferenceRepaintLayer) {
@@ -1966,6 +1969,11 @@
} else if (updatedDiff == StyleDifferenceSimplifiedLayout)
setNeedsSimplifiedNormalFlowLayout();
}
+ if (updatedDiff > StyleDifferenceMinRecompositeLayer) {
+ TRACE_EVENT0("webkit", "setCompleteCompositing");
+ // trigger complete compositing
+ document().setFastCompositing(false);
+ }
if (updatedDiff == StyleDifferenceRepaintLayer || shouldRepaintForStyleDifference(updatedDiff)) {
// Do a repaint with the new style now, e.g., for example if we go from

Powered by Google App Engine
This is Rietveld 408576698