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