| 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
|
|
|