Chromium Code Reviews| 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 0bf40594b49d519a242d450b1859190577331892..7ae1945a2e0514a1330623bdadb1916cb5bd837c 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -1613,6 +1613,17 @@ void LayerTreeHostImpl::UpdateGpuRasterizationStatus() { |
| gpu_rasterization_status_ = GpuRasterizationStatus::OFF_CONTENT; |
| } |
| + if (use_gpu) { |
|
danakj
2015/05/13 20:47:49
I think this is better than making InitializeRende
|
| + // Ensure that a GrContext is initialized for GPU rasterization. |
| + if (!output_surface_->context_provider() || |
| + !output_surface_->worker_context_provider() || |
| + !output_surface_->worker_context_provider()->GrContext()) { |
| + use_gpu = false; |
| + use_msaa = false; |
| + gpu_rasterization_status_ = GpuRasterizationStatus::OFF_DEVICE; |
| + } |
| + } |
| + |
| if (use_gpu == use_gpu_rasterization_ && use_msaa == use_msaa_) |
| return; |