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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 265883013: cc: Add a flag to layers that returns true if the layer is in RSLL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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') | no next file » | 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 1014a3f8c5c16446a1752579be7d0061ceddec97..34d51dd05534f18aeb12129120bc19777296756f 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -97,7 +97,9 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
viewport_size_invalid_(false),
needs_update_draw_properties_(true),
needs_full_tree_sync_(true),
- next_activation_forces_redraw_(false) {}
+ next_activation_forces_redraw_(false),
+ calculate_draw_properties_count_(0u) {
vmpstr 2014/05/02 23:06:27 There is a SourceAnimationFrameNumber, which happe
+}
LayerTreeImpl::~LayerTreeImpl() {
// Need to explicitly clear the tree prior to destroying this so that
@@ -457,6 +459,7 @@ void LayerTreeImpl::UpdateDrawProperties() {
page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer();
bool can_render_to_separate_surface =
!output_surface()->ForcedDrawToSoftwareDevice();
+ ++calculate_draw_properties_count_;
LayerTreeHostCommon::CalcDrawPropsImplInputs inputs(
root_layer(),
DrawViewportSize(),
@@ -490,13 +493,27 @@ void LayerTreeImpl::UpdateDrawProperties() {
++it) {
if (!it.represents_itself())
continue;
+
LayerImpl* layer = *it;
+ layer->draw_properties().last_render_surface_list_membership_index =
vmpstr 2014/05/02 23:06:27 I suspect this should happen in LayerTreeHostCommo
danakj 2014/05/02 23:09:24 Right, the output of CalcDrawProps is the RSLL. If
+ calculate_draw_properties_count_;
layer->UpdateTilePriorities();
- if (layer->mask_layer())
+ if (layer->mask_layer()) {
+ layer->mask_layer()
+ ->draw_properties()
+ .last_render_surface_list_membership_index =
+ calculate_draw_properties_count_;
layer->mask_layer()->UpdateTilePriorities();
- if (layer->replica_layer() && layer->replica_layer()->mask_layer())
+ }
+ if (layer->replica_layer() && layer->replica_layer()->mask_layer()) {
+ layer->replica_layer()
+ ->mask_layer()
+ ->draw_properties()
+ .last_render_surface_list_membership_index =
+ calculate_draw_properties_count_;
layer->replica_layer()->mask_layer()->UpdateTilePriorities();
+ }
}
}
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698