| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index de019b011c12bc066503f45b8dc60ff03c91a9c3..6e0e5509aef83eb5b918d1786aa99eb5b9a02230 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -167,21 +167,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
|
| if (success) {
|
| output_surface_lost_ = false;
|
|
|
| - // Update settings_ based on capabilities that we got back from the
|
| - // renderer.
|
| - settings_.accelerate_painting =
|
| - proxy_->GetRendererCapabilities().using_accelerated_painting;
|
| -
|
| - // 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;
|
| -
|
| + DidUpdateCapabilities();
|
| if (!contents_texture_manager_) {
|
| contents_texture_manager_ =
|
| PrioritizedResourceManager::Create(proxy_.get());
|
| @@ -211,6 +197,22 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
|
| return CreateFailedButTryAgain;
|
| }
|
|
|
| +void LayerTreeHost::DidUpdateCapabilities() {
|
| + // Update settings_ based on capabilities that we got back from the
|
| + // renderer.
|
| + settings_.accelerate_painting =
|
| + proxy_->GetRendererCapabilities().using_accelerated_painting;
|
| + // 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;
|
| +}
|
| +
|
| void LayerTreeHost::DeleteContentsTexturesOnImplThread(
|
| ResourceProvider* resource_provider) {
|
| DCHECK(proxy_->IsImplThread());
|
|
|