| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index c2fce2a6230b4c277c9dad1bea78c3ea613f8355..6c7cfe0e915b2b8e445b81a1f5fc59b8feb42612 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -377,6 +377,7 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
|
| sync_tree->set_sent_top_controls_delta(0.f);
|
|
|
| host_impl->SetUseGpuRasterization(UseGpuRasterization());
|
| + host_impl->set_gpu_rasterization_status(GetGpuRasterizationStatus());
|
| RecordGpuRasterizationHistogram();
|
|
|
| host_impl->SetViewportSize(device_viewport_size_);
|
| @@ -636,6 +637,21 @@ bool LayerTreeHost::UseGpuRasterization() const {
|
| }
|
| }
|
|
|
| +GpuRasterizationStatus LayerTreeHost::GetGpuRasterizationStatus() const {
|
| + if (settings_.gpu_rasterization_forced) {
|
| + return GpuRasterizationStatus::ON_FORCED;
|
| + } else if (settings_.gpu_rasterization_enabled) {
|
| + if (!has_gpu_rasterization_trigger_) {
|
| + return GpuRasterizationStatus::OFF_VIEWPORT;
|
| + } else if (!content_is_suitable_for_gpu_rasterization_) {
|
| + return GpuRasterizationStatus::OFF_CONTENT;
|
| + } else {
|
| + return GpuRasterizationStatus::ON;
|
| + }
|
| + }
|
| + return GpuRasterizationStatus::OFF_DEVICE;
|
| +}
|
| +
|
| void LayerTreeHost::SetHasGpuRasterizationTrigger(bool has_trigger) {
|
| if (has_trigger == has_gpu_rasterization_trigger_)
|
| return;
|
|
|