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..fde446bec6f313edba34e05b489f2ab9e36c3e34 100644 |
--- a/cc/trees/layer_tree_impl.cc |
+++ b/cc/trees/layer_tree_impl.cc |
@@ -4,6 +4,8 @@ |
#include "cc/trees/layer_tree_impl.h" |
+#include <limits> |
+ |
#include "base/debug/trace_event.h" |
#include "cc/animation/keyframed_animation_curve.h" |
#include "cc/animation/scrollbar_animation_controller.h" |
@@ -97,7 +99,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_id_(0) { |
+} |
LayerTreeImpl::~LayerTreeImpl() { |
// Need to explicitly clear the tree prior to destroying this so that |
@@ -457,6 +461,12 @@ void LayerTreeImpl::UpdateDrawProperties() { |
page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); |
bool can_render_to_separate_surface = |
!output_surface()->ForcedDrawToSoftwareDevice(); |
+ |
+ if (calculate_draw_properties_id_ == std::numeric_limits<int>::max()) |
+ calculate_draw_properties_id_ = 1; |
+ else |
+ ++calculate_draw_properties_id_; |
+ |
LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( |
root_layer(), |
DrawViewportSize(), |
@@ -468,7 +478,8 @@ void LayerTreeImpl::UpdateDrawProperties() { |
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_, |
+ calculate_draw_properties_id_); |
LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
} |