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

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, 2 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_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 08fb8105cbec1f97a71438d1aab2cba1eed28f74..6a500be12e67e486c947dfd209586cabbd690cfc 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -127,7 +127,8 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
id_(s_layer_tree_host_sequence_number.GetNext() + 1),
next_commit_forces_redraw_(false),
shared_bitmap_manager_(shared_bitmap_manager),
- gpu_memory_buffer_manager_(gpu_memory_buffer_manager) {
+ gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
+ render_surface_layer_list_id_(0) {
if (settings_.accelerated_animation_enabled)
animation_registrar_ = AnimationRegistrar::Create();
rendering_stats_instrumentation_->set_record_rendering_stats(
@@ -832,10 +833,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(),
@@ -848,7 +846,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_ <=
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698