Chromium Code Reviews| Index: cc/trees/layer_tree_host.cc |
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
| index 611d6aee0a1df4c242c2ece7b9c88a8bc557ea5c..67164c9be7d90bf0d993b8b6da58d7e4714918af 100644 |
| --- a/cc/trees/layer_tree_host.cc |
| +++ b/cc/trees/layer_tree_host.cc |
| @@ -182,16 +182,6 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) { |
| if (success) { |
| output_surface_lost_ = false; |
| - // Update settings_ based on partial update capability. |
| - size_t max_partial_texture_updates = 0; |
| - if (proxy_->GetRendererCapabilities().allow_partial_texture_updates && |
| - !settings_.impl_side_painting) { |
| - max_partial_texture_updates = std::min( |
| - settings_.max_partial_texture_updates, |
| - proxy_->MaxPartialTextureUpdates()); |
| - } |
| - settings_.max_partial_texture_updates = max_partial_texture_updates; |
| - |
| if (!contents_texture_manager_ && |
| (!settings_.impl_side_painting || !settings_.solid_color_scrollbars)) { |
| contents_texture_manager_ = |
| @@ -1085,7 +1075,15 @@ void LayerTreeHost::RateLimit() { |
| } |
| bool LayerTreeHost::RequestPartialTextureUpdate() { |
| - if (partial_texture_update_requests_ >= settings_.max_partial_texture_updates) |
| + size_t max_partial_texture_updates = settings_.max_partial_texture_updates; |
| + if (proxy_->GetRendererCapabilities().allow_partial_texture_updates && |
| + !settings_.impl_side_painting) { |
|
danakj
2013/09/17 21:11:19
indenting is off, run "git cl format" before you u
|
| + max_partial_texture_updates = std::min( |
| + max_partial_texture_updates, |
| + proxy_->MaxPartialTextureUpdates()); |
| + } |
| + |
| + if (partial_texture_update_requests_ >= max_partial_texture_updates) |
| return false; |
| partial_texture_update_requests_++; |