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

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

Issue 1317743002: cc: Implement shared worker contexts. (v1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tear down Created 5 years, 3 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
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int32 route_id() const { return route_id_; } 158 int32 route_id() const { return route_id_; }
159 159
160 int32 stream_id() const { return stream_id_; } 160 int32 stream_id() const { return stream_id_; }
161 161
162 GpuChannelHost* channel() const { return channel_; } 162 GpuChannelHost* channel() const { return channel_; }
163 163
164 base::SharedMemoryHandle GetSharedStateHandle() const { 164 base::SharedMemoryHandle GetSharedStateHandle() const {
165 return shared_state_shm_->handle(); 165 return shared_state_shm_->handle();
166 } 166 }
167 167
168 base::Lock* lock() { return lock_; }
169
168 private: 170 private:
169 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap; 171 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap;
170 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; 172 typedef base::hash_map<uint32, base::Closure> SignalTaskMap;
171 173
172 void CheckLock() { 174 void CheckLock() {
173 if (lock_) 175 if (lock_)
174 lock_->AssertAcquired(); 176 lock_->AssertAcquired();
175 } 177 }
176 178
177 // Send an IPC message over the GPU channel. This is private to fully 179 // Send an IPC message over the GPU channel. This is private to fully
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 235
234 SwapBuffersCompletionCallback swap_buffers_completion_callback_; 236 SwapBuffersCompletionCallback swap_buffers_completion_callback_;
235 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; 237 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_;
236 238
237 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 239 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
238 }; 240 };
239 241
240 } // namespace content 242 } // namespace content
241 243
242 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 244 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698