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..62f8010d50d83dea93046b1b094ffb4a5df449b8 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_count_(0) { |
+} |
LayerTreeImpl::~LayerTreeImpl() { |
// Need to explicitly clear the tree prior to destroying this so that |
@@ -457,6 +461,11 @@ void LayerTreeImpl::UpdateDrawProperties() { |
page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); |
bool can_render_to_separate_surface = |
!output_surface()->ForcedDrawToSoftwareDevice(); |
+ |
+ ++calculate_draw_properties_count_; |
+ if (calculate_draw_properties_count_ == std::numeric_limits<int>::max()) |
danakj
2014/05/05 19:25:41
nit:
if (==max())
= 1
else
++
to also make us
vmpstr
2014/05/05 20:50:34
Done.
|
+ calculate_draw_properties_count_ = 1; |
+ |
LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( |
root_layer(), |
DrawViewportSize(), |
@@ -468,7 +477,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_count_); |
LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
} |
@@ -490,6 +500,7 @@ void LayerTreeImpl::UpdateDrawProperties() { |
++it) { |
if (!it.represents_itself()) |
continue; |
+ |
danakj
2014/05/05 19:25:41
nit: remove
vmpstr
2014/05/05 20:50:34
Done.
|
LayerImpl* layer = *it; |
layer->UpdateTilePriorities(); |