| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index 34f4d2f65d29a0d4d956cef669870e988b1d6240..7bece089d9541c4410a21e1a54ef41dece3b4a2b 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -205,16 +205,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_ =
|
| @@ -1124,8 +1114,19 @@ bool LayerTreeHost::AlwaysUsePartialTextureUpdates() {
|
| return !proxy_->HasImplThread();
|
| }
|
|
|
| +size_t LayerTreeHost::MaxPartialTextureUpdates() const {
|
| + 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());
|
| + }
|
| + return max_partial_texture_updates;
|
| +}
|
| +
|
| 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_++;
|
|
|