| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ | 5 #ifndef MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ |
| 6 #define MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ | 6 #define MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class CommandBufferClientImpl | 36 class CommandBufferClientImpl |
| 37 : public mus::mojom::CommandBufferClient, | 37 : public mus::mojom::CommandBufferClient, |
| 38 public gpu::CommandBuffer, | 38 public gpu::CommandBuffer, |
| 39 public gpu::GpuControl { | 39 public gpu::GpuControl { |
| 40 public: | 40 public: |
| 41 explicit CommandBufferClientImpl( | 41 explicit CommandBufferClientImpl( |
| 42 CommandBufferDelegate* delegate, | 42 CommandBufferDelegate* delegate, |
| 43 const std::vector<int32_t>& attribs, | 43 const std::vector<int32_t>& attribs, |
| 44 const MojoAsyncWaiter* async_waiter, | |
| 45 mojo::ScopedMessagePipeHandle command_buffer_handle); | 44 mojo::ScopedMessagePipeHandle command_buffer_handle); |
| 46 ~CommandBufferClientImpl() override; | 45 ~CommandBufferClientImpl() override; |
| 47 | 46 |
| 48 // CommandBuffer implementation: | 47 // CommandBuffer implementation: |
| 49 bool Initialize() override; | 48 bool Initialize() override; |
| 50 State GetLastState() override; | 49 State GetLastState() override; |
| 51 int32_t GetLastToken() override; | 50 int32_t GetLastToken() override; |
| 52 void Flush(int32_t put_offset) override; | 51 void Flush(int32_t put_offset) override; |
| 53 void OrderingBarrier(int32_t put_offset) override; | 52 void OrderingBarrier(int32_t put_offset) override; |
| 54 void WaitForTokenInRange(int32_t start, int32_t end) override; | 53 void WaitForTokenInRange(int32_t start, int32_t end) override; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 mojo::ScopedSharedBufferHandle shared_state_handle_; | 107 mojo::ScopedSharedBufferHandle shared_state_handle_; |
| 109 gpu::CommandBufferSharedState* shared_state_; | 108 gpu::CommandBufferSharedState* shared_state_; |
| 110 int32_t last_put_offset_; | 109 int32_t last_put_offset_; |
| 111 int32_t next_transfer_buffer_id_; | 110 int32_t next_transfer_buffer_id_; |
| 112 | 111 |
| 113 // Image IDs are allocated in sequence. | 112 // Image IDs are allocated in sequence. |
| 114 int next_image_id_; | 113 int next_image_id_; |
| 115 | 114 |
| 116 uint64_t next_fence_sync_release_; | 115 uint64_t next_fence_sync_release_; |
| 117 uint64_t flushed_fence_sync_release_; | 116 uint64_t flushed_fence_sync_release_; |
| 118 | |
| 119 const MojoAsyncWaiter* async_waiter_; | |
| 120 }; | 117 }; |
| 121 | 118 |
| 122 } // gles2 | 119 } // gles2 |
| 123 | 120 |
| 124 #endif // MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ | 121 #endif // MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ |
| OLD | NEW |