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

Unified Diff: cc/input/main_thread_scrolling_reason.h

Issue 2297943002: Rename kAnimatingScrollOnMainThread to kHandlingScrollFromMainThread (Closed)
Patch Set: update more comments Created 4 years, 3 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/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html » ('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 0a1c1da4ce0b8ac509a7fd0736c32fe14f79e680..3695179c03545f46cf701571442fdc2290f1a529 100644
--- a/cc/input/main_thread_scrolling_reason.h
+++ b/cc/input/main_thread_scrolling_reason.h
@@ -22,7 +22,12 @@ struct MainThreadScrollingReason {
enum : uint32_t { kThreadedScrollingDisabled = 1 << 2 };
enum : uint32_t { kScrollbarScrolling = 1 << 3 };
enum : uint32_t { kPageOverlay = 1 << 4 };
- enum : uint32_t { kAnimatingScrollOnMainThread = 1 << 13 };
+ // This bit is set when any of the other main thread scrolling reasons cause
+ // an input event to be handled on the main thread, and the main thread
+ // blink::ScrollAnimator is in the middle of running a scroll offset
+ // animation. Note that a scroll handled by the main thread can result in an
+ // animation running on the main thread or on the compositor thread.
+ enum : uint32_t { kHandlingScrollFromMainThread = 1 << 13 };
enum : uint32_t { kHasStickyPositionObjects = 1 << 14 };
enum : uint32_t { kCustomScrollbarScrolling = 1 << 15 };
@@ -45,7 +50,7 @@ struct MainThreadScrollingReason {
uint32_t reasons_set_by_main_thread =
kNotScrollingOnMain | kHasBackgroundAttachmentFixedObjects |
kHasNonLayerViewportConstrainedObjects | kThreadedScrollingDisabled |
- kScrollbarScrolling | kPageOverlay | kAnimatingScrollOnMainThread |
+ kScrollbarScrolling | kPageOverlay | kHandlingScrollFromMainThread |
kHasStickyPositionObjects | kCustomScrollbarScrolling;
return (reasons & reasons_set_by_main_thread) == reasons;
}
@@ -87,8 +92,8 @@ struct MainThreadScrollingReason {
tracedValue->AppendString("Scrollbar scrolling");
if (reasons & MainThreadScrollingReason::kPageOverlay)
tracedValue->AppendString("Page overlay");
- if (reasons & MainThreadScrollingReason::kAnimatingScrollOnMainThread)
- tracedValue->AppendString("Animating scroll on main thread");
+ if (reasons & MainThreadScrollingReason::kHandlingScrollFromMainThread)
+ tracedValue->AppendString("Handling scroll from main thread");
if (reasons & MainThreadScrollingReason::kHasStickyPositionObjects)
tracedValue->AppendString("Has sticky position objects");
if (reasons & MainThreadScrollingReason::kCustomScrollbarScrolling)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698