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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move for loop post_init_tasks_ from Initialize to InitializeImpl. And add a cc unit test. Created 4 years, 10 months 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
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index e5b67abd97df7f27fa699b458ce8c13ab6c6231c..60b30cd0f5776e6b6f66d0a21948120cfbe109e8 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -467,6 +467,7 @@ gin::ObjectTemplateBuilder GpuBenchmarking::GetObjectTemplateBuilder(
.SetMethod("runMicroBenchmark", &GpuBenchmarking::RunMicroBenchmark)
.SetMethod("sendMessageToMicroBenchmark",
&GpuBenchmarking::SendMessageToMicroBenchmark)
+ .SetMethod("hasGpuChannel", &GpuBenchmarking::HasGpuChannel)
.SetMethod("hasGpuProcess", &GpuBenchmarking::HasGpuProcess);
}
@@ -868,9 +869,13 @@ bool GpuBenchmarking::SendMessageToMicroBenchmark(
std::move(value));
}
+bool GpuBenchmarking::HasGpuChannel() {
+ GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel();
+ return !!gpu_channel;
+}
+
bool GpuBenchmarking::HasGpuProcess() {
- GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel();
- return !!gpu_channel;
+ return RenderThreadImpl::current()->HasGpuProcess();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698