cc: Add a flag to layers that returns true if the layer is in RSLL.
This patch adds a flag that says whether the layer is currently in RSLL.
Used to remove layers that previously were in RSLL and are no longer
there.
R=enne, danakj
Review URL: https://codereview.chromium.org/265883013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269353 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 465c9cc..962ce7d 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -97,7 +97,9 @@
viewport_size_invalid_(false),
needs_update_draw_properties_(true),
needs_full_tree_sync_(true),
- next_activation_forces_redraw_(false) {}
+ next_activation_forces_redraw_(false),
+ render_surface_layer_list_id_(0) {
+}
LayerTreeImpl::~LayerTreeImpl() {
// Need to explicitly clear the tree prior to destroying this so that
@@ -457,6 +459,8 @@
page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer();
bool can_render_to_separate_surface =
!output_surface()->ForcedDrawToSoftwareDevice();
+
+ ++render_surface_layer_list_id_;
LayerTreeHostCommon::CalcDrawPropsImplInputs inputs(
root_layer(),
DrawViewportSize(),
@@ -468,7 +472,8 @@
settings().can_use_lcd_text,
can_render_to_separate_surface,
settings().layer_transforms_should_scale_layer_contents,
- &render_surface_layer_list_);
+ &render_surface_layer_list_,
+ render_surface_layer_list_id_);
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
}