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

Unified Diff: cc/input/main_thread_scrolling_reason.h

Issue 1648293003: Fix smooth scroll jump when switching scroll handling between MT and CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: todo + nit Created 4 years, 10 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 7e921fc021227b438361317860aaf3b5d415d2ac..67cbc4caca58ca0454750cd049052adbeadafaf4 100644
--- a/cc/input/main_thread_scrolling_reason.h
+++ b/cc/input/main_thread_scrolling_reason.h
@@ -18,6 +18,7 @@ struct MainThreadScrollingReason {
enum : uint32_t { kThreadedScrollingDisabled = 1 << 2 };
enum : uint32_t { kScrollbarScrolling = 1 << 3 };
enum : uint32_t { kPageOverlay = 1 << 4 };
+ enum : uint32_t { kAnimatingScollOnMainThread = 1 << 13 };
jbroman 2016/02/10 20:36:37 nit: Scroll, not Scoll
ymalik 2016/02/10 21:57:58 Wow good catch. nts: don't copy paste long variabl
// Transient scrolling reasons. These are computed for each scroll begin.
enum : uint32_t { kNonFastScrollableRegion = 1 << 5 };
@@ -30,7 +31,7 @@ struct MainThreadScrollingReason {
enum : uint32_t { kPageBasedScrolling = 1 << 12 };
// The number of flags in this struct (excluding itself).
- enum : uint32_t { kMainThreadScrollingReasonCount = 14 };
+ enum : uint32_t { kMainThreadScrollingReasonCount = 15 };
// Returns true if the given MainThreadScrollingReason can be set by the main
// thread.
@@ -38,7 +39,7 @@ struct MainThreadScrollingReason {
uint32_t reasons_set_by_main_thread =
kNotScrollingOnMain | kHasBackgroundAttachmentFixedObjects |
kHasNonLayerViewportConstrainedObjects | kThreadedScrollingDisabled |
- kScrollbarScrolling | kPageOverlay;
+ kScrollbarScrolling | kPageOverlay | kAnimatingScollOnMainThread;
return (reasons & reasons_set_by_main_thread) == reasons;
}

Powered by Google App Engine
This is Rietveld 408576698