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 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "gpu/command_buffer/common/command_buffer.h" | 18 #include "gpu/command_buffer/common/command_buffer.h" |
19 #include "gpu/command_buffer/common/command_buffer_shared.h" | 19 #include "gpu/command_buffer/common/command_buffer_shared.h" |
20 #include "gpu/command_buffer/common/gpu_control.h" | 20 #include "gpu/command_buffer/common/gpu_control.h" |
21 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 21 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
22 #include "ipc/ipc_listener.h" | 22 #include "ipc/ipc_listener.h" |
23 #include "ui/events/latency_info.h" | 23 #include "ui/events/latency_info.h" |
| 24 #include "ui/gfx/gpu_memory_buffer.h" |
24 | 25 |
25 struct GPUCommandBufferConsoleMessage; | 26 struct GPUCommandBufferConsoleMessage; |
26 | 27 |
27 namespace base { | 28 namespace base { |
28 class SharedMemory; | 29 class SharedMemory; |
29 } | 30 } |
30 | 31 |
31 namespace gfx { | |
32 class GpuMemoryBuffer; | |
33 } | |
34 | |
35 namespace gpu { | 32 namespace gpu { |
36 struct Mailbox; | 33 struct Mailbox; |
37 } | 34 } |
38 | 35 |
39 namespace media { | 36 namespace media { |
40 class VideoDecodeAccelerator; | 37 class VideoDecodeAccelerator; |
41 class VideoEncodeAccelerator; | 38 class VideoEncodeAccelerator; |
42 } | 39 } |
43 | 40 |
44 namespace content { | 41 namespace content { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 96 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
100 int32* id) OVERRIDE; | 97 int32* id) OVERRIDE; |
101 virtual void DestroyTransferBuffer(int32 id) OVERRIDE; | 98 virtual void DestroyTransferBuffer(int32 id) OVERRIDE; |
102 | 99 |
103 // gpu::GpuControl implementation: | 100 // gpu::GpuControl implementation: |
104 virtual gpu::Capabilities GetCapabilities() OVERRIDE; | 101 virtual gpu::Capabilities GetCapabilities() OVERRIDE; |
105 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( | 102 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( |
106 size_t width, | 103 size_t width, |
107 size_t height, | 104 size_t height, |
108 unsigned internalformat, | 105 unsigned internalformat, |
| 106 gfx::GpuMemoryBuffer::Usage usage, |
109 int32* id) OVERRIDE; | 107 int32* id) OVERRIDE; |
110 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; | 108 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; |
111 virtual uint32 InsertSyncPoint() OVERRIDE; | 109 virtual uint32 InsertSyncPoint() OVERRIDE; |
112 virtual void SignalSyncPoint(uint32 sync_point, | 110 virtual void SignalSyncPoint(uint32 sync_point, |
113 const base::Closure& callback) OVERRIDE; | 111 const base::Closure& callback) OVERRIDE; |
114 virtual void SignalQuery(uint32 query, | 112 virtual void SignalQuery(uint32 query, |
115 const base::Closure& callback) OVERRIDE; | 113 const base::Closure& callback) OVERRIDE; |
116 virtual void SetSurfaceVisible(bool visible) OVERRIDE; | 114 virtual void SetSurfaceVisible(bool visible) OVERRIDE; |
117 virtual void SendManagedMemoryStats(const gpu::ManagedMemoryStats& stats) | 115 virtual void SendManagedMemoryStats(const gpu::ManagedMemoryStats& stats) |
118 OVERRIDE; | 116 OVERRIDE; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 GpuMemoryBufferMap gpu_memory_buffers_; | 200 GpuMemoryBufferMap gpu_memory_buffers_; |
203 | 201 |
204 gpu::Capabilities capabilities_; | 202 gpu::Capabilities capabilities_; |
205 | 203 |
206 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 204 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
207 }; | 205 }; |
208 | 206 |
209 } // namespace content | 207 } // namespace content |
210 | 208 |
211 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 209 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |