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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |