OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 5 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 new ChildProcessHostMsg_HasGpuProcess(&has_gpu_process))) | 948 new ChildProcessHostMsg_HasGpuProcess(&has_gpu_process))) |
949 return false; | 949 return false; |
950 | 950 |
951 return has_gpu_process; | 951 return has_gpu_process; |
952 } | 952 } |
953 | 953 |
954 void GpuBenchmarking::GetGpuDriverBugWorkarounds(gin::Arguments* args) { | 954 void GpuBenchmarking::GetGpuDriverBugWorkarounds(gin::Arguments* args) { |
955 std::vector<std::string> gpu_driver_bug_workarounds; | 955 std::vector<std::string> gpu_driver_bug_workarounds; |
956 gpu::GpuChannelHost* gpu_channel = | 956 gpu::GpuChannelHost* gpu_channel = |
957 RenderThreadImpl::current()->GetGpuChannel(); | 957 RenderThreadImpl::current()->GetGpuChannel(); |
958 if (!gpu_channel->Send(new GpuChannelMsg_GetDriverBugWorkArounds( | 958 if (!gpu_channel || |
| 959 !gpu_channel->Send(new GpuChannelMsg_GetDriverBugWorkArounds( |
959 &gpu_driver_bug_workarounds))) { | 960 &gpu_driver_bug_workarounds))) { |
960 return; | 961 return; |
961 } | 962 } |
962 | 963 |
963 v8::Local<v8::Value> result; | 964 v8::Local<v8::Value> result; |
964 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) | 965 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) |
965 args->Return(result); | 966 args->Return(result); |
966 } | 967 } |
967 | 968 |
968 } // namespace content | 969 } // namespace content |
OLD | NEW |