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

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

Issue 1463823002: Add DriverBugWorkaroundsInGpuProcessPage to gpu_process_test.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the fixes and only keep the test that check presence of the fake workaround Created 4 years, 8 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 cecaddfea20411b1334aeda4dcb99984c172741b..e95a9f0de0530c423272ca97e73c633063768624 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -32,6 +32,7 @@
#include "gin/arguments.h"
#include "gin/handle.h"
#include "gin/object_template_builder.h"
+#include "gpu/ipc/common/gpu_messages.h"
#include "third_party/WebKit/public/web/WebImageCache.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -503,7 +504,9 @@ gin::ObjectTemplateBuilder GpuBenchmarking::GetObjectTemplateBuilder(
.SetMethod("sendMessageToMicroBenchmark",
&GpuBenchmarking::SendMessageToMicroBenchmark)
.SetMethod("hasGpuChannel", &GpuBenchmarking::HasGpuChannel)
- .SetMethod("hasGpuProcess", &GpuBenchmarking::HasGpuProcess);
+ .SetMethod("hasGpuProcess", &GpuBenchmarking::HasGpuProcess)
+ .SetMethod("getGpuDriverBugWorkarounds",
+ &GpuBenchmarking::GetGpuDriverBugWorkarounds);
}
void GpuBenchmarking::SetNeedsDisplayOnAllLayers() {
@@ -923,4 +926,18 @@ bool GpuBenchmarking::HasGpuProcess() {
return has_gpu_process;
}
+void GpuBenchmarking::GetGpuDriverBugWorkarounds(gin::Arguments* args) {
+ std::vector<std::string> gpu_driver_bug_workarounds;
+ gpu::GpuChannelHost* gpu_channel =
+ RenderThreadImpl::current()->GetGpuChannel();
+ if (!gpu_channel->Send(new GpuChannelMsg_GetDriverBugWorkArounds(
+ &gpu_driver_bug_workarounds))) {
+ return;
+ }
+
+ v8::Local<v8::Value> result;
+ if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result))
+ args->Return(result);
+}
+
} // 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