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 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 v8::Local<v8::Context> v8_context = | 902 v8::Local<v8::Context> v8_context = |
903 context.web_frame()->mainWorldScriptContext(); | 903 context.web_frame()->mainWorldScriptContext(); |
904 scoped_ptr<base::Value> value = | 904 scoped_ptr<base::Value> value = |
905 make_scoped_ptr(converter->FromV8Value(message, v8_context)); | 905 make_scoped_ptr(converter->FromV8Value(message, v8_context)); |
906 | 906 |
907 return context.compositor()->SendMessageToMicroBenchmark(id, | 907 return context.compositor()->SendMessageToMicroBenchmark(id, |
908 std::move(value)); | 908 std::move(value)); |
909 } | 909 } |
910 | 910 |
911 bool GpuBenchmarking::HasGpuChannel() { | 911 bool GpuBenchmarking::HasGpuChannel() { |
912 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); | 912 gpu::GpuChannelHost* gpu_channel = |
| 913 RenderThreadImpl::current()->GetGpuChannel(); |
913 return !!gpu_channel; | 914 return !!gpu_channel; |
914 } | 915 } |
915 | 916 |
916 bool GpuBenchmarking::HasGpuProcess() { | 917 bool GpuBenchmarking::HasGpuProcess() { |
917 bool has_gpu_process = false; | 918 bool has_gpu_process = false; |
918 if (!RenderThreadImpl::current()->Send( | 919 if (!RenderThreadImpl::current()->Send( |
919 new ChildProcessHostMsg_HasGpuProcess(&has_gpu_process))) | 920 new ChildProcessHostMsg_HasGpuProcess(&has_gpu_process))) |
920 return false; | 921 return false; |
921 | 922 |
922 return has_gpu_process; | 923 return has_gpu_process; |
923 } | 924 } |
924 | 925 |
925 } // namespace content | 926 } // namespace content |
OLD | NEW |