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

Unified Diff: cc/input/main_thread_scrolling_reason.h

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/main_thread_scrolling_reason.h
diff --git a/cc/input/main_thread_scrolling_reason.h b/cc/input/main_thread_scrolling_reason.h
index 85a8ea117b7f1df92bf94ec792e3993599026bc6..d06cbd188597bf8e247ba459b0f6efbbeb32a980 100644
--- a/cc/input/main_thread_scrolling_reason.h
+++ b/cc/input/main_thread_scrolling_reason.h
@@ -31,9 +31,13 @@ struct MainThreadScrollingReason {
// animation running on the main thread or on the compositor thread.
kHandlingScrollFromMainThread = 1 << 13,
kCustomScrollbarScrolling = 1 << 15,
+
+ // Style Related scrolling on main reasons
kHasOpacity = 1 << 16,
kHasTransform = 1 << 17,
kBackgroundNotOpaqueInRect = 1 << 18,
+ kHasBorderRadius = 1 << 19,
+ kHasClipRelatedProperty = 1 << 20,
// Transient scrolling reasons. These are computed for each scroll begin.
kNonFastScrollableRegion = 1 << 5,
@@ -44,8 +48,12 @@ struct MainThreadScrollingReason {
kNonInvertibleTransform = 1 << 11,
kPageBasedScrolling = 1 << 12,
- // The number of flags in this struct (excluding itself).
- kMainThreadScrollingReasonCount = 20,
+ // TODO(yigu): the following variable is confusing. It's not the count of
+ // values, but the maximum shift + 2 because the loop in
+ // InputHandlerProxy::RecordMainThreadScrollingReasons is "wrong".
+ // It should be the max number of flags in this struct (excluding itself).
+ // Will fix it in a followup patch.
+ kMainThreadScrollingReasonCount = 22,
};
// Returns true if the given MainThreadScrollingReason can be set by the main
@@ -56,7 +64,7 @@ struct MainThreadScrollingReason {
kHasNonLayerViewportConstrainedObjects | kThreadedScrollingDisabled |
kScrollbarScrolling | kPageOverlay | kHandlingScrollFromMainThread |
kCustomScrollbarScrolling | kHasOpacity | kHasTransform |
- kBackgroundNotOpaqueInRect;
+ kBackgroundNotOpaqueInRect | kHasBorderRadius | kHasClipRelatedProperty;
return (reasons & reasons_set_by_main_thread) == reasons;
}
@@ -107,6 +115,10 @@ struct MainThreadScrollingReason {
tracedValue->AppendString("Has transform");
if (reasons & MainThreadScrollingReason::kBackgroundNotOpaqueInRect)
tracedValue->AppendString("Background is not opaque in rect");
+ if (reasons & MainThreadScrollingReason::kHasBorderRadius)
+ tracedValue->AppendString("Has border radius");
+ if (reasons & MainThreadScrollingReason::kHasClipRelatedProperty)
+ tracedValue->AppendString("Has clip related property");
// Transient scrolling reasons.
if (reasons & MainThreadScrollingReason::kNonFastScrollableRegion)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698