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 <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 public: | 35 public: |
36 explicit CommandBufferClientImpl( | 36 explicit CommandBufferClientImpl( |
37 CommandBufferDelegate* delegate, | 37 CommandBufferDelegate* delegate, |
38 const MojoAsyncWaiter* async_waiter, | 38 const MojoAsyncWaiter* async_waiter, |
39 mojo::ScopedMessagePipeHandle command_buffer_handle); | 39 mojo::ScopedMessagePipeHandle command_buffer_handle); |
40 ~CommandBufferClientImpl() override; | 40 ~CommandBufferClientImpl() override; |
41 | 41 |
42 // CommandBuffer implementation: | 42 // CommandBuffer implementation: |
43 bool Initialize() override; | 43 bool Initialize() override; |
44 State GetLastState() override; | 44 State GetLastState() override; |
45 int32 GetLastToken() override; | 45 int32_t GetLastToken() override; |
46 void Flush(int32 put_offset) override; | 46 void Flush(int32_t put_offset) override; |
47 void WaitForTokenInRange(int32 start, int32 end) override; | 47 void OrderingBarrier(int32_t put_offset) override; |
48 void WaitForGetOffsetInRange(int32 start, int32 end) override; | 48 void WaitForTokenInRange(int32_t start, int32_t end) override; |
49 void SetGetBuffer(int32 shm_id) override; | 49 void WaitForGetOffsetInRange(int32_t start, int32_t end) override; |
| 50 void SetGetBuffer(int32_t shm_id) override; |
50 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 51 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
51 int32* id) override; | 52 int32_t* id) override; |
52 void DestroyTransferBuffer(int32 id) override; | 53 void DestroyTransferBuffer(int32_t id) override; |
53 | 54 |
54 // gpu::GpuControl implementation: | 55 // gpu::GpuControl implementation: |
55 gpu::Capabilities GetCapabilities() override; | 56 gpu::Capabilities GetCapabilities() override; |
56 int32_t CreateImage(ClientBuffer buffer, | 57 int32_t CreateImage(ClientBuffer buffer, |
57 size_t width, | 58 size_t width, |
58 size_t height, | 59 size_t height, |
59 unsigned internalformat) override; | 60 unsigned internalformat) override; |
60 void DestroyImage(int32_t id) override; | 61 void DestroyImage(int32_t id) override; |
61 int32_t CreateGpuMemoryBufferImage(size_t width, | 62 int32_t CreateGpuMemoryBufferImage(size_t width, |
62 size_t height, | 63 size_t height, |
(...skipping 26 matching lines...) Expand all Loading... |
89 CommandBufferDelegate* delegate_; | 90 CommandBufferDelegate* delegate_; |
90 mojo::Binding<mojo::CommandBufferLostContextObserver> observer_binding_; | 91 mojo::Binding<mojo::CommandBufferLostContextObserver> observer_binding_; |
91 mojo::CommandBufferPtr command_buffer_; | 92 mojo::CommandBufferPtr command_buffer_; |
92 scoped_ptr<SyncClientImpl> sync_client_impl_; | 93 scoped_ptr<SyncClientImpl> sync_client_impl_; |
93 scoped_ptr<SyncPointClientImpl> sync_point_client_impl_; | 94 scoped_ptr<SyncPointClientImpl> sync_point_client_impl_; |
94 | 95 |
95 gpu::Capabilities capabilities_; | 96 gpu::Capabilities capabilities_; |
96 State last_state_; | 97 State last_state_; |
97 mojo::ScopedSharedBufferHandle shared_state_handle_; | 98 mojo::ScopedSharedBufferHandle shared_state_handle_; |
98 gpu::CommandBufferSharedState* shared_state_; | 99 gpu::CommandBufferSharedState* shared_state_; |
99 int32 last_put_offset_; | 100 int32_t last_put_offset_; |
100 int32 next_transfer_buffer_id_; | 101 int32_t next_transfer_buffer_id_; |
101 | 102 |
102 const MojoAsyncWaiter* async_waiter_; | 103 const MojoAsyncWaiter* async_waiter_; |
103 }; | 104 }; |
104 | 105 |
105 } // gles2 | 106 } // gles2 |
106 | 107 |
107 #endif // MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ | 108 #endif // MOJO_GLES2_COMMAND_BUFFER_CLIENT_IMPL_H_ |
OLD | NEW |