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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 548963002: Generalize scroll parent work in CalculateDrawProperties Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index dce1d42e11d071384b5f9ee1dcaaa2b82446e791..86442992f14a4ccf35da98abc73a9eca9d62cac0 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -123,7 +123,8 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
total_frames_used_for_lcd_text_metrics_(0),
id_(s_layer_tree_host_sequence_number.GetNext() + 1),
next_commit_forces_redraw_(false),
- shared_bitmap_manager_(manager) {
+ shared_bitmap_manager_(manager),
+ render_surface_layer_list_id_(0) {
if (settings_.accelerated_animation_enabled)
animation_registrar_ = AnimationRegistrar::Create();
rendering_stats_instrumentation_->set_record_rendering_stats(
@@ -827,10 +828,7 @@ bool LayerTreeHost::UpdateLayers(Layer* root_layer,
TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps");
bool can_render_to_separate_surface = true;
- // TODO(vmpstr): Passing 0 as the current render surface layer list id means
- // that we won't be able to detect if a layer is part of |update_list|.
- // Change this if this information is required.
- int render_surface_layer_list_id = 0;
+ ++render_surface_layer_list_id_;
LayerTreeHostCommon::CalcDrawPropsMainInputs inputs(
root_layer,
device_viewport_size(),
@@ -843,7 +841,7 @@ bool LayerTreeHost::UpdateLayers(Layer* root_layer,
can_render_to_separate_surface,
settings_.layer_transforms_should_scale_layer_contents,
&update_list,
- render_surface_layer_list_id);
+ render_surface_layer_list_id_);
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
if (total_frames_used_for_lcd_text_metrics_ <=

Powered by Google App Engine
This is Rietveld 408576698