Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <stack> | 8 #include <stack> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 730 Layer* found = FindFirstScrollableLayer(layer->children()[i].get()); | 730 Layer* found = FindFirstScrollableLayer(layer->children()[i].get()); |
| 731 if (found) | 731 if (found) |
| 732 return found; | 732 return found; |
| 733 } | 733 } |
| 734 | 734 |
| 735 return NULL; | 735 return NULL; |
| 736 } | 736 } |
| 737 | 737 |
| 738 void LayerTreeHost::RecordGpuRasterizationHistogram() { | 738 void LayerTreeHost::RecordGpuRasterizationHistogram() { |
| 739 // Gpu rasterization is only supported for Renderer compositors. | 739 // Gpu rasterization is only supported for Renderer compositors. |
| 740 // Checking for IsThreaded() to exclude Browser compositors. | 740 // Checking for IsSingleThreaded() to exclude Browser compositors. |
| 741 if (gpu_rasterization_histogram_recorded_ || IsThreaded()) | 741 if (gpu_rasterization_histogram_recorded_ || IsSingleThreaded()) |
|
vmpstr
2015/12/10 00:35:00
It would be nice to add a test so this doesn't reg
| |
| 742 return; | 742 return; |
| 743 | 743 |
| 744 // Record how widely gpu rasterization is enabled. | 744 // Record how widely gpu rasterization is enabled. |
| 745 // This number takes device/gpu whitelisting/backlisting into account. | 745 // This number takes device/gpu whitelisting/backlisting into account. |
| 746 // Note that we do not consider the forced gpu rasterization mode, which is | 746 // Note that we do not consider the forced gpu rasterization mode, which is |
| 747 // mostly used for debugging purposes. | 747 // mostly used for debugging purposes. |
| 748 UMA_HISTOGRAM_BOOLEAN("Renderer4.GpuRasterizationEnabled", | 748 UMA_HISTOGRAM_BOOLEAN("Renderer4.GpuRasterizationEnabled", |
| 749 settings_.gpu_rasterization_enabled); | 749 settings_.gpu_rasterization_enabled); |
| 750 if (settings_.gpu_rasterization_enabled) { | 750 if (settings_.gpu_rasterization_enabled) { |
| 751 UMA_HISTOGRAM_BOOLEAN("Renderer4.GpuRasterizationTriggered", | 751 UMA_HISTOGRAM_BOOLEAN("Renderer4.GpuRasterizationTriggered", |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1257 return compositor_mode_ == CompositorMode::SingleThreaded; | 1257 return compositor_mode_ == CompositorMode::SingleThreaded; |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 bool LayerTreeHost::IsThreaded() const { | 1260 bool LayerTreeHost::IsThreaded() const { |
| 1261 DCHECK(compositor_mode_ != CompositorMode::Threaded || | 1261 DCHECK(compositor_mode_ != CompositorMode::Threaded || |
| 1262 task_runner_provider_->HasImplThread()); | 1262 task_runner_provider_->HasImplThread()); |
| 1263 return compositor_mode_ == CompositorMode::Threaded; | 1263 return compositor_mode_ == CompositorMode::Threaded; |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 } // namespace cc | 1266 } // namespace cc |
| OLD | NEW |