OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_channel_host.h" | 5 #include "content/renderer/gpu/gpu_channel_host.h" |
6 | 6 |
7 #include "content/common/child_process.h" | 7 #include "content/common/child_process.h" |
8 #include "content/common/gpu/gpu_messages.h" | 8 #include "content/common/gpu/gpu_messages.h" |
9 #include "content/renderer/gpu/command_buffer_proxy.h" | 9 #include "content/renderer/gpu/command_buffer_proxy.h" |
10 #include "content/renderer/gpu/gpu_surface_proxy.h" | 10 #include "content/renderer/gpu/gpu_surface_proxy.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 router_.AddRoute(route_id, command_buffer); | 123 router_.AddRoute(route_id, command_buffer); |
124 proxies_[route_id] = command_buffer; | 124 proxies_[route_id] = command_buffer; |
125 return command_buffer; | 125 return command_buffer; |
126 #else | 126 #else |
127 return NULL; | 127 return NULL; |
128 #endif | 128 #endif |
129 } | 129 } |
130 | 130 |
131 GpuVideoDecodeAcceleratorHost* GpuChannelHost::CreateVideoDecoder( | 131 GpuVideoDecodeAcceleratorHost* GpuChannelHost::CreateVideoDecoder( |
132 int command_buffer_route_id, | 132 int command_buffer_route_id, |
133 const std::vector<uint32>& configs, | 133 const std::vector<int32>& configs, |
134 media::VideoDecodeAccelerator::Client* client) { | 134 media::VideoDecodeAccelerator::Client* client) { |
135 ProxyMap::iterator it = proxies_.find(command_buffer_route_id); | 135 ProxyMap::iterator it = proxies_.find(command_buffer_route_id); |
136 DCHECK(it != proxies_.end()); | 136 DCHECK(it != proxies_.end()); |
137 CommandBufferProxy* proxy = it->second; | 137 CommandBufferProxy* proxy = it->second; |
138 return proxy->CreateVideoDecoder(configs, client); | 138 return proxy->CreateVideoDecoder(configs, client); |
139 } | 139 } |
140 | 140 |
141 CommandBufferProxy* GpuChannelHost::CreateOffscreenCommandBuffer( | 141 CommandBufferProxy* GpuChannelHost::CreateOffscreenCommandBuffer( |
142 const gfx::Size& size, | 142 const gfx::Size& size, |
143 const std::string& allowed_extensions, | 143 const std::string& allowed_extensions, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 void GpuChannelHost::DestroySurface(GpuSurfaceProxy* surface) { | 202 void GpuChannelHost::DestroySurface(GpuSurfaceProxy* surface) { |
203 #if defined(ENABLE_GPU) | 203 #if defined(ENABLE_GPU) |
204 Send(new GpuChannelMsg_DestroySurface(surface->route_id())); | 204 Send(new GpuChannelMsg_DestroySurface(surface->route_id())); |
205 if (router_.ResolveRoute(surface->route_id())) | 205 if (router_.ResolveRoute(surface->route_id())) |
206 router_.RemoveRoute(surface->route_id()); | 206 router_.RemoveRoute(surface->route_id()); |
207 | 207 |
208 delete surface; | 208 delete surface; |
209 #endif | 209 #endif |
210 } | 210 } |
OLD | NEW |