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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2581843002: Implement merging non-composited paint property nodes in the PACompositor. (Closed)
Patch Set: none Created 4 years 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: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index d566bce62457849e08dff4dd1d9c86918207e0e1..82ac34fe6e98ab6c2a20ca2c7b6bbcfbd9f14008 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -306,6 +306,7 @@ void PaintPropertyTreeBuilder::updateTransformForNonRootSVG(
static CompositingReasons compositingReasonsForTransform(
const LayoutObject& object) {
+
CompositingReasons compositingReasons = CompositingReasonNone;
if (CompositingReasonFinder::requiresCompositingForTransform(object))
compositingReasons |= CompositingReason3DTransform;
@@ -318,6 +319,18 @@ static CompositingReasons compositingReasonsForTransform(
!object.styleRef().subtreeWillChangeContents())
compositingReasons |= CompositingReasonWillChangeCompositingHint;
+ if (object.isBoxModelObject()) {
+ const LayoutBoxModelObject* box = toLayoutBoxModelObject(&object);
+ if (box->hasLayer()) {
+ // TODO(chrishtr): move this to the descendant-dependent flags recursion
+ // PaintLayer::updateDescendantDependentFlags.
+ box->layer()->update3DTransformedDescendantStatus();
+
+ if (box->layer()->has3DTransformedDescendant())
+ compositingReasons |= CompositingReason3DTransform;
+ }
+ }
+
return compositingReasons;
}

Powered by Google App Engine
This is Rietveld 408576698