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_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "gpu/command_buffer/common/command_buffer.h" | 10 #include "gpu/command_buffer/common/command_buffer.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 typedef base::Callback<bool(int32)> GetBufferChangedCallback; | 45 typedef base::Callback<bool(int32)> GetBufferChangedCallback; |
46 explicit CommandBufferService( | 46 explicit CommandBufferService( |
47 TransferBufferManagerInterface* transfer_buffer_manager); | 47 TransferBufferManagerInterface* transfer_buffer_manager); |
48 ~CommandBufferService() override; | 48 ~CommandBufferService() override; |
49 | 49 |
50 // CommandBuffer implementation: | 50 // CommandBuffer implementation: |
51 bool Initialize() override; | 51 bool Initialize() override; |
52 State GetLastState() override; | 52 State GetLastState() override; |
53 int32 GetLastToken() override; | 53 int32 GetLastToken() override; |
54 void Flush(int32 put_offset) override; | 54 void Flush(int32 put_offset) override; |
| 55 void OrderingBarrier(int32 put_offset) override; |
55 void WaitForTokenInRange(int32 start, int32 end) override; | 56 void WaitForTokenInRange(int32 start, int32 end) override; |
56 void WaitForGetOffsetInRange(int32 start, int32 end) override; | 57 void WaitForGetOffsetInRange(int32 start, int32 end) override; |
57 void SetGetBuffer(int32 transfer_buffer_id) override; | 58 void SetGetBuffer(int32 transfer_buffer_id) override; |
58 scoped_refptr<Buffer> CreateTransferBuffer(size_t size, int32* id) override; | 59 scoped_refptr<Buffer> CreateTransferBuffer(size_t size, int32* id) override; |
59 void DestroyTransferBuffer(int32 id) override; | 60 void DestroyTransferBuffer(int32 id) override; |
60 | 61 |
61 // CommandBufferServiceBase implementation: | 62 // CommandBufferServiceBase implementation: |
62 void SetGetOffset(int32 get_offset) override; | 63 void SetGetOffset(int32 get_offset) override; |
63 scoped_refptr<Buffer> GetTransferBuffer(int32 id) override; | 64 scoped_refptr<Buffer> GetTransferBuffer(int32 id) override; |
64 void SetToken(int32 token) override; | 65 void SetToken(int32 token) override; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 uint32 generation_; | 107 uint32 generation_; |
107 error::Error error_; | 108 error::Error error_; |
108 error::ContextLostReason context_lost_reason_; | 109 error::ContextLostReason context_lost_reason_; |
109 | 110 |
110 DISALLOW_COPY_AND_ASSIGN(CommandBufferService); | 111 DISALLOW_COPY_AND_ASSIGN(CommandBufferService); |
111 }; | 112 }; |
112 | 113 |
113 } // namespace gpu | 114 } // namespace gpu |
114 | 115 |
115 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ | 116 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ |
OLD | NEW |