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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 gpu::gles2::MailboxManager* mailbox_manager, | 76 gpu::gles2::MailboxManager* mailbox_manager, |
77 gpu::gles2::SubscriptionRefSet* subscription_ref_set, | 77 gpu::gles2::SubscriptionRefSet* subscription_ref_set, |
78 gpu::ValueStateMap* pending_valuebuffer_state, | 78 gpu::ValueStateMap* pending_valuebuffer_state, |
79 const gfx::Size& size, | 79 const gfx::Size& size, |
80 const gpu::gles2::DisallowedFeatures& disallowed_features, | 80 const gpu::gles2::DisallowedFeatures& disallowed_features, |
81 const std::vector<int32>& attribs, | 81 const std::vector<int32>& attribs, |
82 gfx::GpuPreference gpu_preference, | 82 gfx::GpuPreference gpu_preference, |
83 bool use_virtualized_gl_context, | 83 bool use_virtualized_gl_context, |
84 int32 stream_id, | 84 int32 stream_id, |
85 int32 route_id, | 85 int32 route_id, |
86 int32 surface_id, | 86 bool offscreen, |
87 GpuWatchdog* watchdog, | 87 GpuWatchdog* watchdog, |
88 bool software, | |
89 const GURL& active_url); | 88 const GURL& active_url); |
90 | 89 |
91 ~GpuCommandBufferStub() override; | 90 ~GpuCommandBufferStub() override; |
92 | 91 |
93 // IPC::Listener implementation: | 92 // IPC::Listener implementation: |
94 bool OnMessageReceived(const IPC::Message& message) override; | 93 bool OnMessageReceived(const IPC::Message& message) override; |
95 | 94 |
96 // IPC::Sender implementation: | 95 // IPC::Sender implementation: |
97 bool Send(IPC::Message* msg) override; | 96 bool Send(IPC::Message* msg) override; |
98 | 97 |
(...skipping 10 matching lines...) Expand all Loading... |
109 // Whether there are commands in the buffer that haven't been processed. | 108 // Whether there are commands in the buffer that haven't been processed. |
110 bool HasUnprocessedCommands(); | 109 bool HasUnprocessedCommands(); |
111 | 110 |
112 gpu::gles2::GLES2Decoder* decoder() const { return decoder_.get(); } | 111 gpu::gles2::GLES2Decoder* decoder() const { return decoder_.get(); } |
113 gpu::GpuScheduler* scheduler() const { return scheduler_.get(); } | 112 gpu::GpuScheduler* scheduler() const { return scheduler_.get(); } |
114 GpuChannel* channel() const { return channel_; } | 113 GpuChannel* channel() const { return channel_; } |
115 | 114 |
116 // Unique command buffer ID for this command buffer stub. | 115 // Unique command buffer ID for this command buffer stub. |
117 uint64_t command_buffer_id() const { return command_buffer_id_; } | 116 uint64_t command_buffer_id() const { return command_buffer_id_; } |
118 | 117 |
119 // Identifies the target surface. | |
120 int32 surface_id() const { return surface_id_; } | |
121 | |
122 // Identifies the various GpuCommandBufferStubs in the GPU process belonging | 118 // Identifies the various GpuCommandBufferStubs in the GPU process belonging |
123 // to the same renderer process. | 119 // to the same renderer process. |
124 int32 route_id() const { return route_id_; } | 120 int32 route_id() const { return route_id_; } |
125 | 121 |
126 // Identifies the stream for this command buffer. | 122 // Identifies the stream for this command buffer. |
127 int32 stream_id() const { return stream_id_; } | 123 int32 stream_id() const { return stream_id_; } |
128 | 124 |
129 gfx::GpuPreference gpu_preference() { return gpu_preference_; } | 125 gfx::GpuPreference gpu_preference() { return gpu_preference_; } |
130 | 126 |
131 int32 GetRequestedAttribute(int attr) const; | 127 int32 GetRequestedAttribute(int attr) const; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 bool initialized_; | 254 bool initialized_; |
259 gfx::GLSurfaceHandle handle_; | 255 gfx::GLSurfaceHandle handle_; |
260 gfx::Size initial_size_; | 256 gfx::Size initial_size_; |
261 gpu::gles2::DisallowedFeatures disallowed_features_; | 257 gpu::gles2::DisallowedFeatures disallowed_features_; |
262 std::vector<int32> requested_attribs_; | 258 std::vector<int32> requested_attribs_; |
263 gfx::GpuPreference gpu_preference_; | 259 gfx::GpuPreference gpu_preference_; |
264 bool use_virtualized_gl_context_; | 260 bool use_virtualized_gl_context_; |
265 const uint64_t command_buffer_id_; | 261 const uint64_t command_buffer_id_; |
266 const int32 stream_id_; | 262 const int32 stream_id_; |
267 const int32 route_id_; | 263 const int32 route_id_; |
268 const int32 surface_id_; | 264 const bool offscreen_; |
269 bool software_; | |
270 uint32 last_flush_count_; | 265 uint32 last_flush_count_; |
271 | 266 |
272 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 267 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
273 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 268 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
274 scoped_ptr<gpu::GpuScheduler> scheduler_; | 269 scoped_ptr<gpu::GpuScheduler> scheduler_; |
275 scoped_ptr<gpu::SyncPointClient> sync_point_client_; | 270 scoped_ptr<gpu::SyncPointClient> sync_point_client_; |
276 scoped_refptr<gfx::GLSurface> surface_; | 271 scoped_refptr<gfx::GLSurface> surface_; |
277 | 272 |
278 scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_; | 273 scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_; |
279 // The last memory allocation received from the GpuMemoryManager (used to | 274 // The last memory allocation received from the GpuMemoryManager (used to |
(...skipping 23 matching lines...) Expand all Loading... |
303 size_t total_gpu_memory_; | 298 size_t total_gpu_memory_; |
304 scoped_ptr<WaitForCommandState> wait_for_token_; | 299 scoped_ptr<WaitForCommandState> wait_for_token_; |
305 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 300 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
306 | 301 |
307 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 302 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
308 }; | 303 }; |
309 | 304 |
310 } // namespace content | 305 } // namespace content |
311 | 306 |
312 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 307 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |