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

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: Test both LCD and non-LCD reasons 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: 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..8b386b4b7d8fd6b2b225352d196d061a5402a977 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,11 @@ 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. Will fix it
+ // in a followup patch.
+ kMainThreadScrollingReasonCount = 22,
};
// Returns true if the given MainThreadScrollingReason can be set by the main
@@ -56,7 +63,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 +114,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)

Powered by Google App Engine
This is Rietveld 408576698