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

Unified Diff: cc/layers/layer.cc

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: remove fn to clear all main thread scrolling reasons 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/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 24ae93291ebf13f2f225c3c6231e8f084b03b736..b1ade9b6ed8869a2ed51a8cf359c722fb93638eb 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -960,12 +960,12 @@ void Layer::AddMainThreadScrollingReasons(
SetNeedsCommit();
}
-void Layer::ClearMainThreadScrollingReasons() {
+void Layer::ClearMainThreadScrollingReasons(
+ uint32_t main_thread_scrolling_reasons_to_clear) {
DCHECK(IsPropertyChangeAllowed());
- if (!main_thread_scrolling_reasons_)
- return;
+ DCHECK(main_thread_scrolling_reasons_to_clear);
ajuma 2016/02/04 20:08:40 Is it possible that we reach here and main_thread_
ymalik 2016/02/04 21:53:20 Yeah totally. Perhaps we should do the same for Ad
ajuma 2016/02/04 22:45:29 Yes, please do.
main_thread_scrolling_reasons_ =
- MainThreadScrollingReason::kNotScrollingOnMain;
+ ~main_thread_scrolling_reasons_to_clear & main_thread_scrolling_reasons_;
SetNeedsCommit();
}

Powered by Google App Engine
This is Rietveld 408576698