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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more 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
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 860f067f9f87d42be779023d5e42a23ae49ea088..c160d97bb96b4a4d0eff95ccf2d8b86ddf06de32 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -231,6 +231,24 @@ void LayerTreeImpl::UpdateMaxScrollOffset() {
root_scroll_layer_->SetMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll));
}
+static void ApplySentScrollDeltasOn(LayerImpl* layer) {
+ layer->ApplySentScrollDeltas();
+}
+
+void LayerTreeImpl::ApplySentScrollAndScaleDeltas() {
+ DCHECK(IsActiveTree());
+
+ page_scale_factor_ *= sent_page_scale_delta_;
+ page_scale_delta_ /= sent_page_scale_delta_;
+ sent_page_scale_delta_ = 1.f;
+
+ if (!root_layer())
+ return;
+
+ LayerTreeHostCommon::CallFunctionForSubtree(
+ root_layer(), base::Bind(&ApplySentScrollDeltasOn));
+}
+
void LayerTreeImpl::UpdateSolidColorScrollbars() {
DCHECK(settings().solid_color_scrollbars);
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698