Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.h

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 gpu::error::ContextLostReason reason) OVERRIDE; 96 gpu::error::ContextLostReason reason) OVERRIDE;
97 97
98 // gpu::GpuControl implementation: 98 // gpu::GpuControl implementation:
99 virtual gpu::Capabilities GetCapabilities() OVERRIDE; 99 virtual gpu::Capabilities GetCapabilities() OVERRIDE;
100 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( 100 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
101 size_t width, 101 size_t width,
102 size_t height, 102 size_t height,
103 unsigned internalformat, 103 unsigned internalformat,
104 int32* id) OVERRIDE; 104 int32* id) OVERRIDE;
105 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; 105 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
106 virtual bool GenerateMailboxNames(unsigned num,
107 std::vector<gpu::Mailbox>* names) OVERRIDE;
108 virtual uint32 InsertSyncPoint() OVERRIDE; 106 virtual uint32 InsertSyncPoint() OVERRIDE;
109 virtual void SignalSyncPoint(uint32 sync_point, 107 virtual void SignalSyncPoint(uint32 sync_point,
110 const base::Closure& callback) OVERRIDE; 108 const base::Closure& callback) OVERRIDE;
111 virtual void SignalQuery(uint32 query, 109 virtual void SignalQuery(uint32 query,
112 const base::Closure& callback) OVERRIDE; 110 const base::Closure& callback) OVERRIDE;
113 virtual void SetSurfaceVisible(bool visible) OVERRIDE; 111 virtual void SetSurfaceVisible(bool visible) OVERRIDE;
114 virtual void SendManagedMemoryStats(const gpu::ManagedMemoryStats& stats) 112 virtual void SendManagedMemoryStats(const gpu::ManagedMemoryStats& stats)
115 OVERRIDE; 113 OVERRIDE;
116 virtual void Echo(const base::Closure& callback) OVERRIDE; 114 virtual void Echo(const base::Closure& callback) OVERRIDE;
117 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; 115 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // verify that the context has not been lost. 150 // verify that the context has not been lost.
153 bool Send(IPC::Message* msg); 151 bool Send(IPC::Message* msg);
154 152
155 // Message handlers: 153 // Message handlers:
156 void OnUpdateState(const gpu::CommandBuffer::State& state); 154 void OnUpdateState(const gpu::CommandBuffer::State& state);
157 void OnDestroyed(gpu::error::ContextLostReason reason); 155 void OnDestroyed(gpu::error::ContextLostReason reason);
158 void OnEchoAck(); 156 void OnEchoAck();
159 void OnConsoleMessage(const GPUCommandBufferConsoleMessage& message); 157 void OnConsoleMessage(const GPUCommandBufferConsoleMessage& message);
160 void OnSetMemoryAllocation(const gpu::MemoryAllocation& allocation); 158 void OnSetMemoryAllocation(const gpu::MemoryAllocation& allocation);
161 void OnSignalSyncPointAck(uint32 id); 159 void OnSignalSyncPointAck(uint32 id);
162 void OnGenerateMailboxNamesReply(const std::vector<std::string>& names);
163 160
164 // Try to read an updated copy of the state from shared memory. 161 // Try to read an updated copy of the state from shared memory.
165 void TryUpdateState(); 162 void TryUpdateState();
166 163
167 // The shared memory area used to update state. 164 // The shared memory area used to update state.
168 gpu::CommandBufferSharedState* shared_state() const { 165 gpu::CommandBufferSharedState* shared_state() const {
169 return reinterpret_cast<gpu::CommandBufferSharedState*>( 166 return reinterpret_cast<gpu::CommandBufferSharedState*>(
170 shared_state_shm_->memory()); 167 shared_state_shm_->memory());
171 } 168 }
172 169
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 GpuMemoryBufferMap gpu_memory_buffers_; 203 GpuMemoryBufferMap gpu_memory_buffers_;
207 204
208 gpu::Capabilities capabilities_; 205 gpu::Capabilities capabilities_;
209 206
210 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 207 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
211 }; 208 };
212 209
213 } // namespace content 210 } // namespace content
214 211
215 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 212 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698