| 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 GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void DidCreateAcceleratedSurfaceChildWindow( | 89 void DidCreateAcceleratedSurfaceChildWindow( |
| 90 SurfaceHandle parent_window, | 90 SurfaceHandle parent_window, |
| 91 SurfaceHandle child_window) override; | 91 SurfaceHandle child_window) override; |
| 92 #endif | 92 #endif |
| 93 void DidSwapBuffersComplete(SwapBuffersCompleteParams params) override; | 93 void DidSwapBuffersComplete(SwapBuffersCompleteParams params) override; |
| 94 const gles2::FeatureInfo* GetFeatureInfo() const override; | 94 const gles2::FeatureInfo* GetFeatureInfo() const override; |
| 95 void SetLatencyInfoCallback(const LatencyInfoCallback& callback) override; | 95 void SetLatencyInfoCallback(const LatencyInfoCallback& callback) override; |
| 96 void UpdateVSyncParameters(base::TimeTicks timebase, | 96 void UpdateVSyncParameters(base::TimeTicks timebase, |
| 97 base::TimeDelta interval) override; | 97 base::TimeDelta interval) override; |
| 98 | 98 |
| 99 void AddFilter(IPC::MessageFilter* message_filter) override; |
| 100 int32_t GetRouteID() const override { return route_id_; } |
| 101 |
| 99 gles2::MemoryTracker* GetMemoryTracker() const; | 102 gles2::MemoryTracker* GetMemoryTracker() const; |
| 100 | 103 |
| 101 // Whether this command buffer can currently handle IPC messages. | 104 // Whether this command buffer can currently handle IPC messages. |
| 102 bool IsScheduled(); | 105 bool IsScheduled(); |
| 103 | 106 |
| 104 // 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. |
| 105 bool HasUnprocessedCommands(); | 108 bool HasUnprocessedCommands(); |
| 106 | 109 |
| 107 gles2::GLES2Decoder* decoder() const { return decoder_.get(); } | 110 gles2::GLES2Decoder* decoder() const { return decoder_.get(); } |
| 108 CommandExecutor* scheduler() const { return executor_.get(); } | 111 CommandExecutor* scheduler() const { return executor_.get(); } |
| 109 GpuChannel* channel() const { return channel_; } | 112 GpuChannel* channel() const { return channel_; } |
| 110 | 113 |
| 111 // Unique command buffer ID for this command buffer stub. | 114 // Unique command buffer ID for this command buffer stub. |
| 112 CommandBufferId command_buffer_id() const { return command_buffer_id_; } | 115 CommandBufferId command_buffer_id() const { return command_buffer_id_; } |
| 113 | 116 |
| 114 // Identifies the various GpuCommandBufferStubs in the GPU process belonging | |
| 115 // to the same renderer process. | |
| 116 int32_t route_id() const { return route_id_; } | |
| 117 | |
| 118 // Identifies the stream for this command buffer. | 117 // Identifies the stream for this command buffer. |
| 119 int32_t stream_id() const { return stream_id_; } | 118 int32_t stream_id() const { return stream_id_; } |
| 120 | 119 |
| 121 // Sends a message to the console. | 120 // Sends a message to the console. |
| 122 void SendConsoleMessage(int32_t id, const std::string& message); | 121 void SendConsoleMessage(int32_t id, const std::string& message); |
| 123 | 122 |
| 124 void SendCachedShader(const std::string& key, const std::string& shader); | 123 void SendCachedShader(const std::string& key, const std::string& shader); |
| 125 | 124 |
| 126 gl::GLSurface* surface() const { return surface_.get(); } | 125 gl::GLSurface* surface() const { return surface_.get(); } |
| 127 | 126 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 248 |
| 250 std::unique_ptr<WaitForCommandState> wait_for_token_; | 249 std::unique_ptr<WaitForCommandState> wait_for_token_; |
| 251 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; | 250 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; |
| 252 | 251 |
| 253 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 252 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 254 }; | 253 }; |
| 255 | 254 |
| 256 } // namespace gpu | 255 } // namespace gpu |
| 257 | 256 |
| 258 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 257 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |