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/common/gpu/gpu_channel_manager.h" | 5 #include "content/common/gpu/gpu_channel_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "content/common/child_thread.h" | 9 #include "content/common/child_thread.h" |
10 #include "content/common/gpu/gpu_channel.h" | 10 #include "content/common/gpu/gpu_channel.h" |
11 #include "content/common/gpu/gpu_memory_manager.h" | 11 #include "content/common/gpu/gpu_memory_manager.h" |
12 #include "content/common/gpu/gpu_messages.h" | 12 #include "content/common/gpu/gpu_messages.h" |
13 #include "content/common/gpu/sync_point_manager.h" | 13 #include "content/common/gpu/sync_point_manager.h" |
14 #include "gpu/command_buffer/service/feature_info.h" | 14 #include "gpu/command_buffer/service/feature_info.h" |
15 #include "gpu/command_buffer/service/gpu_switches.h" | 15 #include "gpu/command_buffer/service/gpu_switches.h" |
16 #include "gpu/command_buffer/service/mailbox_manager.h" | 16 #include "gpu/command_buffer/service/mailbox_manager.h" |
17 #include "gpu/command_buffer/service/memory_program_cache.h" | 17 #include "gpu/command_buffer/service/memory_program_cache.h" |
18 #include "ui/gl/gl_bindings.h" | 18 #include "ui/gl/gl_bindings.h" |
19 #include "ui/gl/gl_share_group.h" | 19 #include "ui/gl/gl_share_group.h" |
20 | 20 |
| 21 namespace content { |
| 22 |
21 GpuChannelManager::ImageOperation::ImageOperation( | 23 GpuChannelManager::ImageOperation::ImageOperation( |
22 int32 sync_point, base::Closure callback) | 24 int32 sync_point, base::Closure callback) |
23 : sync_point(sync_point), | 25 : sync_point(sync_point), |
24 callback(callback) { | 26 callback(callback) { |
25 } | 27 } |
26 | 28 |
27 GpuChannelManager::ImageOperation::~ImageOperation() { | 29 GpuChannelManager::ImageOperation::~ImageOperation() { |
28 } | 30 } |
29 | 31 |
30 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, | 32 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 gpu_channels_.clear(); | 269 gpu_channels_.clear(); |
268 } | 270 } |
269 | 271 |
270 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { | 272 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { |
271 if (!default_offscreen_surface_.get()) { | 273 if (!default_offscreen_surface_.get()) { |
272 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( | 274 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
273 false, gfx::Size(1, 1)); | 275 false, gfx::Size(1, 1)); |
274 } | 276 } |
275 return default_offscreen_surface_.get(); | 277 return default_offscreen_surface_.get(); |
276 } | 278 } |
| 279 |
| 280 } // namespace content |
OLD | NEW |