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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: bugref, scale_delta DCHECK + comment Created 4 years, 4 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/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index ea3a2b99015f16dfb2ed77b750182b098905a70d..cf9206c939011ef6b4965eb93e2b2745ee3abb70 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -245,15 +245,6 @@ void SingleThreadProxy::DoCommit() {
"461509 SingleThreadProxy::DoCommit7"));
layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get());
-#if DCHECK_IS_ON()
- // In the single-threaded case, the scale and scroll deltas should never be
- // touched on the impl layer tree.
- std::unique_ptr<ScrollAndScaleSet> scroll_info =
- layer_tree_host_impl_->ProcessScrollDeltas();
- DCHECK(scroll_info->scrolls.empty());
- DCHECK_EQ(1.f, scroll_info->page_scale_delta);
-#endif
-
if (scheduler_on_impl_thread_)
scheduler_on_impl_thread_->DidCommit();
@@ -794,6 +785,14 @@ void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) {
void SingleThreadProxy::DoBeginMainFrame(
const BeginFrameArgs& begin_frame_args) {
+ // In the single-threaded case, the scale deltas should never be touched on
+ // the impl layer tree. However, impl-side scroll deltas may be manipulated
+ // directly via the InputHandler on the UI thread.
+ std::unique_ptr<ScrollAndScaleSet> scroll_info =
+ layer_tree_host_impl_->ProcessScrollDeltas();
+ DCHECK_EQ(1.f, scroll_info->page_scale_delta);
+ layer_tree_host_->ApplyScrollAndScale(scroll_info.get());
+
layer_tree_host_->WillBeginMainFrame();
layer_tree_host_->BeginMainFrame(begin_frame_args);
layer_tree_host_->AnimateLayers(begin_frame_args.frame_time);
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | chrome/browser/ui/views/extensions/extension_install_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698