Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3571)

Unified Diff: cc/trees/layer_tree_host.cc

Issue 1511743004: cc: Fix recording of GPU rasterization histogram for renderer compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ForTesting to SetTaskRunnerProvider. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 6eb60f64390c425fec8fd98fad4578c69f8b21cf..6ac4cd38e7be7a32e57d72011cd862c3cf0375aa 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -166,6 +166,12 @@ void LayerTreeHost::InitializeForTesting(
InitializeProxy(std::move(proxy_for_testing));
}
+void LayerTreeHost::SetTaskRunnerProviderForTesting(
+ scoped_ptr<TaskRunnerProvider> task_runner_provider) {
+ DCHECK(!task_runner_provider_);
+ task_runner_provider_ = std::move(task_runner_provider);
+}
+
void LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) {
TRACE_EVENT0("cc", "LayerTreeHost::InitializeForReal");
@@ -737,8 +743,8 @@ static Layer* FindFirstScrollableLayer(Layer* layer) {
void LayerTreeHost::RecordGpuRasterizationHistogram() {
// Gpu rasterization is only supported for Renderer compositors.
- // Checking for IsThreaded() to exclude Browser compositors.
- if (gpu_rasterization_histogram_recorded_ || IsThreaded())
+ // Checking for IsSingleThreaded() to exclude Browser compositors.
+ if (gpu_rasterization_histogram_recorded_ || IsSingleThreaded())
return;
// Record how widely gpu rasterization is enabled.
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698