| Index: cc/trees/layer_tree_host_impl.cc
|
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
| index ea30d8517395eed55d388bf2db0c7048ea3c3353..18f4fc7a5f38ac18e4b1e5cfdd96baa9cac78d2e 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -1593,11 +1593,13 @@ void LayerTreeHostImpl::SetUseGpuRasterization(bool use_gpu) {
|
| if (use_gpu == use_gpu_rasterization_)
|
| return;
|
|
|
| + // Note that this must happen first, in case the rest of the calls want to
|
| + // query the new state of |use_gpu_rasterization_|.
|
| use_gpu_rasterization_ = use_gpu;
|
| - ReleaseTreeResources();
|
|
|
| - // Replace existing tile manager with another one that uses appropriate
|
| - // rasterizer.
|
| + // Clean up and replace existing tile manager with another one that uses
|
| + // appropriate rasterizer.
|
| + ReleaseTreeResources();
|
| if (tile_manager_) {
|
| DestroyTileManager();
|
| CreateAndSetTileManager();
|
|
|