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