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

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

Issue 2613743002: Clip related property and border radius are now recorded for UMA (Closed)
Patch Set: Add clip path test for ancestor and descendant Created 3 years, 11 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: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 99602b8289bc03bb1fdc0aa58eac80b373ff37ae..8f2680f107e4dab4ee25d3d674aeccc9975af315 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1736,6 +1736,11 @@ bool PaintLayerScrollableArea::computeNeedsCompositedScrolling(
CompositorMutableProperty::kScrollLeft)))
return true;
+ if (layer->size().isEmpty())
+ return false;
+
+ bool needsCompositedScrolling = true;
+
// TODO(flackr): Allow integer transforms as long as all of the ancestor
// transforms are also integer.
bool backgroundSupportsLCDText =
@@ -1762,17 +1767,25 @@ bool PaintLayerScrollableArea::computeNeedsCompositedScrolling(
addStyleRelatedMainThreadScrollingReasons(
MainThreadScrollingReason::kBackgroundNotOpaqueInRect);
}
- return false;
+ needsCompositedScrolling = false;
}
// TODO(schenney) Tests fail if we do not also exclude
// layer->layoutObject()->style()->hasBorderDecoration() (missing background
// behind dashed borders). Resolve this case, or not, and update this check
// with the results.
- return !(layer->size().isEmpty() || layer->hasDescendantWithClipPath() ||
- layer->hasAncestorWithClipPath() ||
- layer->layoutObject()->style()->hasBorderRadius() ||
- layer->layoutObject()->hasClip());
+ if (layer->layoutObject()->style()->hasBorderRadius()) {
+ addStyleRelatedMainThreadScrollingReasons(
+ MainThreadScrollingReason::kHasBorderRadius);
+ needsCompositedScrolling = false;
+ }
+ if (layer->layoutObject()->hasClip() || layer->hasDescendantWithClipPath() ||
+ layer->hasAncestorWithClipPath()) {
+ addStyleRelatedMainThreadScrollingReasons(
+ MainThreadScrollingReason::kHasClipRelatedProperty);
+ needsCompositedScrolling = false;
+ }
+ return needsCompositedScrolling;
}
void PaintLayerScrollableArea::addStyleRelatedMainThreadScrollingReasons(
« no previous file with comments | « cc/input/main_thread_scrolling_reason.h ('k') | third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698