Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index e3a1b32924839b697d18d135ad0b816ef3711d81..13c0984c1ea07a0885de4b924aa2fc20fca8b46a 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -130,6 +130,7 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client, |
background_color_(SK_ColorWHITE), |
has_transparent_background_(false), |
partial_texture_update_requests_(0), |
+ max_partial_texture_updates_(settings_.max_partial_texture_updates), |
danakj
2013/10/03 17:42:26
Can we initialize this to 0?
|
in_paint_layer_contents_(false), |
total_frames_used_for_lcd_text_metrics_(0), |
tree_id_(s_next_tree_id++) { |
@@ -205,7 +206,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) { |
if (success) { |
output_surface_lost_ = false; |
- // Update settings_ based on partial update capability. |
+ // Update max_partial_texture_updates_ based on partial update capability. |
size_t max_partial_texture_updates = 0; |
if (proxy_->GetRendererCapabilities().allow_partial_texture_updates && |
!settings_.impl_side_painting) { |
@@ -213,7 +214,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) { |
settings_.max_partial_texture_updates, |
proxy_->MaxPartialTextureUpdates()); |
} |
- settings_.max_partial_texture_updates = max_partial_texture_updates; |
+ max_partial_texture_updates_ = max_partial_texture_updates; |
if (!contents_texture_manager_ && |
(!settings_.impl_side_painting || !settings_.solid_color_scrollbars)) { |
@@ -1119,7 +1120,7 @@ void LayerTreeHost::RateLimit() { |
} |
bool LayerTreeHost::RequestPartialTextureUpdate() { |
- if (partial_texture_update_requests_ >= settings_.max_partial_texture_updates) |
+ if (partial_texture_update_requests_ >= MaxPartialTextureUpdates()) |
return false; |
partial_texture_update_requests_++; |