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

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: New test for texture state 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/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 9da16b4deddc42ca38b89da28d19a2835f01dbb5..4d1d6a4921bff87546c3b7e88f398882b85467bc 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);

Powered by Google App Engine
This is Rietveld 408576698