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

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: Execute todo, send IPC directly from gpu_benchmarking_extension.cc and fixes variable names. 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
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.h ('k') | content/test/gpu/gpu_tests/gpu_process.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1eb6ef33c09af37fb66fa8e02df2b9d3e6fa2d0c 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "cc/layers/layer.h"
+#include "content/common/gpu/gpu_messages.h"
#include "content/common/input/synthetic_gesture_params.h"
#include "content/common/input/synthetic_pinch_gesture_params.h"
#include "content/common/input/synthetic_smooth_drag_gesture_params.h"
@@ -467,6 +468,7 @@ gin::ObjectTemplateBuilder GpuBenchmarking::GetObjectTemplateBuilder(
.SetMethod("runMicroBenchmark", &GpuBenchmarking::RunMicroBenchmark)
.SetMethod("sendMessageToMicroBenchmark",
&GpuBenchmarking::SendMessageToMicroBenchmark)
+ .SetMethod("hasGpuChannel", &GpuBenchmarking::HasGpuChannel)
.SetMethod("hasGpuProcess", &GpuBenchmarking::HasGpuProcess);
}
@@ -868,9 +870,18 @@ 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;
+ bool has_gpu_process = false;
+ if (!RenderThreadImpl::current()->Send(
+ new GpuHostMsg_HasGpuProcess(&has_gpu_process)))
+ return false;
+
+ return has_gpu_process;
}
} // namespace content
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.h ('k') | content/test/gpu/gpu_tests/gpu_process.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698