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_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 return scheduler_.get() && scheduler_->IsPreempted(); | 109 return scheduler_.get() && scheduler_->IsPreempted(); |
110 } | 110 } |
111 | 111 |
112 // Whether there are commands in the buffer that haven't been processed. | 112 // Whether there are commands in the buffer that haven't been processed. |
113 bool HasUnprocessedCommands(); | 113 bool HasUnprocessedCommands(); |
114 | 114 |
115 gpu::gles2::GLES2Decoder* decoder() const { return decoder_.get(); } | 115 gpu::gles2::GLES2Decoder* decoder() const { return decoder_.get(); } |
116 gpu::GpuScheduler* scheduler() const { return scheduler_.get(); } | 116 gpu::GpuScheduler* scheduler() const { return scheduler_.get(); } |
117 GpuChannel* channel() const { return channel_; } | 117 GpuChannel* channel() const { return channel_; } |
118 | 118 |
| 119 // Unique command buffer ID for this command buffer stub. |
| 120 uint64_t command_buffer_id() const { return command_buffer_id_; } |
| 121 |
119 // Identifies the target surface. | 122 // Identifies the target surface. |
120 int32 surface_id() const { return surface_id_; } | 123 int32 surface_id() const { return surface_id_; } |
121 | 124 |
122 // Identifies the various GpuCommandBufferStubs in the GPU process belonging | 125 // Identifies the various GpuCommandBufferStubs in the GPU process belonging |
123 // to the same renderer process. | 126 // to the same renderer process. |
124 int32 route_id() const { return route_id_; } | 127 int32 route_id() const { return route_id_; } |
125 | 128 |
126 // Identifies the stream for this command buffer. | 129 // Identifies the stream for this command buffer. |
127 int32 stream_id() const { return stream_id_; } | 130 int32 stream_id() const { return stream_id_; } |
128 | 131 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // The group of contexts that share namespaces with this context. | 255 // The group of contexts that share namespaces with this context. |
253 scoped_refptr<gpu::gles2::ContextGroup> context_group_; | 256 scoped_refptr<gpu::gles2::ContextGroup> context_group_; |
254 | 257 |
255 bool initialized_; | 258 bool initialized_; |
256 gfx::GLSurfaceHandle handle_; | 259 gfx::GLSurfaceHandle handle_; |
257 gfx::Size initial_size_; | 260 gfx::Size initial_size_; |
258 gpu::gles2::DisallowedFeatures disallowed_features_; | 261 gpu::gles2::DisallowedFeatures disallowed_features_; |
259 std::vector<int32> requested_attribs_; | 262 std::vector<int32> requested_attribs_; |
260 gfx::GpuPreference gpu_preference_; | 263 gfx::GpuPreference gpu_preference_; |
261 bool use_virtualized_gl_context_; | 264 bool use_virtualized_gl_context_; |
| 265 const uint64_t command_buffer_id_; |
262 const int32 stream_id_; | 266 const int32 stream_id_; |
263 const int32 route_id_; | 267 const int32 route_id_; |
264 const int32 surface_id_; | 268 const int32 surface_id_; |
265 bool software_; | 269 bool software_; |
266 uint32 last_flush_count_; | 270 uint32 last_flush_count_; |
267 | 271 |
268 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 272 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
269 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 273 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
270 scoped_ptr<gpu::GpuScheduler> scheduler_; | 274 scoped_ptr<gpu::GpuScheduler> scheduler_; |
271 scoped_refptr<gfx::GLSurface> surface_; | 275 scoped_refptr<gfx::GLSurface> surface_; |
(...skipping 26 matching lines...) Expand all Loading... |
298 size_t total_gpu_memory_; | 302 size_t total_gpu_memory_; |
299 scoped_ptr<WaitForCommandState> wait_for_token_; | 303 scoped_ptr<WaitForCommandState> wait_for_token_; |
300 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 304 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
301 | 305 |
302 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 306 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
303 }; | 307 }; |
304 | 308 |
305 } // namespace content | 309 } // namespace content |
306 | 310 |
307 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 311 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |