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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 10663003: Merge the IPCs used for GPU process synchronization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 } 98 }
99 99
100 void AcceleratedSurfaceBuffersSwappedCompleted(int host_id, 100 void AcceleratedSurfaceBuffersSwappedCompleted(int host_id,
101 int route_id, 101 int route_id,
102 bool alive) { 102 bool alive) {
103 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) { 103 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
104 GpuProcessHost* host = GpuProcessHost::FromID(host_id); 104 GpuProcessHost* host = GpuProcessHost::FromID(host_id);
105 if (host) { 105 if (host) {
106 if (alive) 106 if (alive)
107 host->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); 107 host->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id));
108 else { 108 else {
109 host->ForceShutdown(); 109 host->ForceShutdown();
110 } 110 }
111 } 111 }
112 } else { 112 } else {
113 BrowserThread::PostTask( 113 BrowserThread::PostTask(
114 BrowserThread::IO, 114 BrowserThread::IO,
115 FROM_HERE, 115 FROM_HERE,
116 base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted, 116 base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted,
117 host_id, 117 host_id,
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 const IPC::ChannelHandle& channel_handle, 818 const IPC::ChannelHandle& channel_handle,
819 base::ProcessHandle renderer_process_for_gpu, 819 base::ProcessHandle renderer_process_for_gpu,
820 const content::GPUInfo& gpu_info) { 820 const content::GPUInfo& gpu_info) {
821 callback.Run(channel_handle, gpu_info); 821 callback.Run(channel_handle, gpu_info);
822 } 822 }
823 823
824 void GpuProcessHost::CreateCommandBufferError( 824 void GpuProcessHost::CreateCommandBufferError(
825 const CreateCommandBufferCallback& callback, int32 route_id) { 825 const CreateCommandBufferCallback& callback, int32 route_id) {
826 callback.Run(route_id); 826 callback.Run(route_id);
827 } 827 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698