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

Side by Side Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 1827123002: Move content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.cc ('k') | content/renderer/gpu/stream_texture_host_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698