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> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); | 134 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); |
135 | 135 |
136 // TODO(apatrick): this is a temporary optimization while skia is calling | 136 // TODO(apatrick): this is a temporary optimization while skia is calling |
137 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 | 137 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 |
138 // ints redundantly when only the error is needed for the | 138 // ints redundantly when only the error is needed for the |
139 // CommandBufferProxyImpl implementation. | 139 // CommandBufferProxyImpl implementation. |
140 virtual gpu::error::Error GetLastError() OVERRIDE; | 140 virtual gpu::error::Error GetLastError() OVERRIDE; |
141 | 141 |
142 GpuChannelHost* channel() const { return channel_; } | 142 GpuChannelHost* channel() const { return channel_; } |
143 | 143 |
| 144 base::SharedMemoryHandle GetSharedStateHandle() const { |
| 145 return shared_state_shm_->handle(); |
| 146 } |
| 147 |
144 private: | 148 private: |
145 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap; | 149 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap; |
146 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; | 150 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; |
147 typedef base::ScopedPtrHashMap<int32, gfx::GpuMemoryBuffer> | 151 typedef base::ScopedPtrHashMap<int32, gfx::GpuMemoryBuffer> |
148 GpuMemoryBufferMap; | 152 GpuMemoryBufferMap; |
149 | 153 |
150 // Send an IPC message over the GPU channel. This is private to fully | 154 // Send an IPC message over the GPU channel. This is private to fully |
151 // encapsulate the channel; all callers of this function must explicitly | 155 // encapsulate the channel; all callers of this function must explicitly |
152 // verify that the context has not been lost. | 156 // verify that the context has not been lost. |
153 bool Send(IPC::Message* msg); | 157 bool Send(IPC::Message* msg); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 GpuMemoryBufferMap gpu_memory_buffers_; | 203 GpuMemoryBufferMap gpu_memory_buffers_; |
200 | 204 |
201 gpu::Capabilities capabilities_; | 205 gpu::Capabilities capabilities_; |
202 | 206 |
203 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 207 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
204 }; | 208 }; |
205 | 209 |
206 } // namespace content | 210 } // namespace content |
207 | 211 |
208 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 212 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |