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

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

Issue 2604973002: Move computation of 3D descendants to the descendant-dependent flags walk. (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 6baebf02bfb5a7794626ffa4a5af5af5d5137593..1521b9de637b5ac19d944f3acd194213801ca099 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -307,25 +307,23 @@ void PaintPropertyTreeBuilder::updateTransformForNonRootSVG(
static CompositingReasons compositingReasonsForTransform(
const LayoutObject& object) {
+ const ComputedStyle& style = object.styleRef();
CompositingReasons compositingReasons = CompositingReasonNone;
if (CompositingReasonFinder::requiresCompositingForTransform(object))
compositingReasons |= CompositingReason3DTransform;
- if (CompositingReasonFinder::requiresCompositingForTransformAnimation(
- object.styleRef()))
+ if (CompositingReasonFinder::requiresCompositingForTransformAnimation(style))
compositingReasons |= CompositingReasonActiveAnimation;
- if (object.styleRef().hasWillChangeCompositingHint() &&
- !object.styleRef().subtreeWillChangeContents())
+ if (style.hasWillChangeCompositingHint() &&
+ !style.subtreeWillChangeContents())
compositingReasons |= CompositingReasonWillChangeCompositingHint;
- if (object.isBoxModelObject()) {
+ if (object.isBoxModelObject() &&
Xianzhu 2016/12/28 18:08:11 Not related to the change, but just a question: we
+ (style.hasPerspective() ||
+ style.usedTransformStyle3D() == TransformStyle3DPreserve3D)) {
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;
}

Powered by Google App Engine
This is Rietveld 408576698