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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp

Issue 2571043002: Set a direct compositing reason for 3D transform & will-change property tree nodes (Closed)
Patch Set: 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/layout/compositing/CompositingReasonFinder.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
index 1ee5b2d22a5a7dec2d091f2c86020a1f9f2018db..f414c68cf594e11a019bce909050a55b78c4283b 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
@@ -74,7 +74,7 @@ CompositingReasonFinder::potentialCompositingReasonsFromStyle(
const ComputedStyle& style = layoutObject->styleRef();
- if (requiresCompositingForTransform(layoutObject))
+ if (requiresCompositingForTransform(*layoutObject))
reasons |= CompositingReason3DTransform;
if (style.backfaceVisibility() == BackfaceVisibilityHidden)
@@ -132,12 +132,12 @@ CompositingReasonFinder::potentialCompositingReasonsFromStyle(
}
bool CompositingReasonFinder::requiresCompositingForTransform(
- LayoutObject* layoutObject) const {
+ const LayoutObject& layoutObject) {
// Note that we ask the layoutObject if it has a transform, because the style
// may have transforms, but the layoutObject may be an inline that doesn't
// support them.
- return layoutObject->hasTransformRelatedProperty() &&
- layoutObject->style()->has3DTransform();
+ return layoutObject.hasTransformRelatedProperty() &&
+ layoutObject.styleRef().has3DTransform();
}
CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(
@@ -171,7 +171,7 @@ CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(
}
bool CompositingReasonFinder::requiresCompositingForAnimation(
- const ComputedStyle& style) const {
+ const ComputedStyle& style) {
if (style.subtreeWillChangeContents())
return style.isRunningAnimationOnCompositor();

Powered by Google App Engine
This is Rietveld 408576698