Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.h |
| diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h |
| index d2ea6cbc6069303e295d3a919f9d1629b05f03fe..3b7b5e1652abce9b157a152141345e481a57be47 100644 |
| --- a/cc/trees/layer_tree_host_impl.h |
| +++ b/cc/trees/layer_tree_host_impl.h |
| @@ -405,14 +405,13 @@ class CC_EXPORT LayerTreeHostImpl |
| void SetHasGpuRasterizationTrigger(bool flag) { |
| has_gpu_rasterization_trigger_ = flag; |
| - UpdateGpuRasterizationStatus(); |
| + need_update_gpu_rasterization_status_ = true; |
|
enne (OOO)
2016/08/17 17:48:43
Should this early out if it hasn't changed?
danakj
2016/08/17 18:16:41
Done.
|
| } |
| void SetContentIsSuitableForGpuRasterization(bool flag) { |
| content_is_suitable_for_gpu_rasterization_ = flag; |
| - UpdateGpuRasterizationStatus(); |
| + need_update_gpu_rasterization_status_ = true; |
| } |
| bool CanUseGpuRasterization(); |
| - void UpdateTreeResourcesForGpuRasterizationIfNeeded(); |
| bool use_gpu_rasterization() const { return use_gpu_rasterization_; } |
| bool use_msaa() const { return use_msaa_; } |
| @@ -657,7 +656,9 @@ class CC_EXPORT LayerTreeHostImpl |
| void AnimateInternal(bool active_tree); |
| - void UpdateGpuRasterizationStatus(); |
| + // Returns true if status changed. |
| + bool UpdateGpuRasterizationStatus(); |
| + void UpdateTreeResourcesForGpuRasterizationIfNeeded(); |
| Viewport* viewport() { return viewport_.get(); } |
| @@ -727,12 +728,12 @@ class CC_EXPORT LayerTreeHostImpl |
| OutputSurface* output_surface_; |
| std::unique_ptr<ResourceProvider> resource_provider_; |
| + bool need_update_gpu_rasterization_status_; |
| bool content_is_suitable_for_gpu_rasterization_; |
| bool has_gpu_rasterization_trigger_; |
| bool use_gpu_rasterization_; |
| bool use_msaa_; |
| GpuRasterizationStatus gpu_rasterization_status_; |
| - bool tree_resources_for_gpu_rasterization_dirty_; |
| std::unique_ptr<RasterBufferProvider> raster_buffer_provider_; |
| std::unique_ptr<TileTaskManager> tile_task_manager_; |
| std::unique_ptr<ResourcePool> resource_pool_; |