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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address danakj's review comments Created 7 years, 5 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 484acb6486f6591c6b48225440b8d5f8cc15703b..ce00994286bf5cf8cc984a9ad985077a4e6c96a4 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -171,6 +171,11 @@ void SingleThreadProxy::SetNeedsAnimate() {
NOTREACHED();
}
+void SingleThreadProxy::SetNeedsUpdateLayers() {
+ DCHECK(Proxy::IsMainThread());
+ layer_tree_host_->ScheduleComposite();
+}
+
void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
DCHECK(Proxy::IsMainThread());
// Commit immediately.
@@ -203,11 +208,12 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
layer_tree_host_impl_->CommitComplete();
#ifndef NDEBUG
- // In the single-threaded case, the scroll deltas should never be
+ // In the single-threaded case, the scale and scroll deltas should never be
// touched on the impl layer tree.
scoped_ptr<ScrollAndScaleSet> scroll_info =
layer_tree_host_impl_->ProcessScrollDeltas();
DCHECK(!scroll_info->scrolls.size());
+ DCHECK_EQ(1.f, scroll_info->page_scale_delta);
#endif
base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);

Powered by Google App Engine
This is Rietveld 408576698