| 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 PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
| 6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 PpapiCommandBufferProxy(const HostResource& resource, | 36 PpapiCommandBufferProxy(const HostResource& resource, |
| 37 PluginDispatcher* dispatcher, | 37 PluginDispatcher* dispatcher, |
| 38 const gpu::Capabilities& capabilities, | 38 const gpu::Capabilities& capabilities, |
| 39 const SerializedHandle& shared_state, | 39 const SerializedHandle& shared_state, |
| 40 gpu::CommandBufferId command_buffer_id); | 40 gpu::CommandBufferId command_buffer_id); |
| 41 ~PpapiCommandBufferProxy() override; | 41 ~PpapiCommandBufferProxy() override; |
| 42 | 42 |
| 43 // gpu::CommandBuffer implementation: | 43 // gpu::CommandBuffer implementation: |
| 44 State GetLastState() override; | 44 State GetLastState() override; |
| 45 int32_t GetLastToken() override; | |
| 46 void Flush(int32_t put_offset) override; | 45 void Flush(int32_t put_offset) override; |
| 47 void OrderingBarrier(int32_t put_offset) override; | 46 void OrderingBarrier(int32_t put_offset) override; |
| 48 void WaitForTokenInRange(int32_t start, int32_t end) override; | 47 State WaitForTokenInRange(int32_t start, int32_t end) override; |
| 49 void WaitForGetOffsetInRange(int32_t start, int32_t end) override; | 48 State WaitForGetOffsetInRange(int32_t start, int32_t end) override; |
| 50 void SetGetBuffer(int32_t transfer_buffer_id) override; | 49 void SetGetBuffer(int32_t transfer_buffer_id) override; |
| 51 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 50 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
| 52 int32_t* id) override; | 51 int32_t* id) override; |
| 53 void DestroyTransferBuffer(int32_t id) override; | 52 void DestroyTransferBuffer(int32_t id) override; |
| 54 | 53 |
| 55 // gpu::GpuControl implementation: | 54 // gpu::GpuControl implementation: |
| 56 void SetGpuControlClient(gpu::GpuControlClient*) override; | 55 void SetGpuControlClient(gpu::GpuControlClient*) override; |
| 57 gpu::Capabilities GetCapabilities() override; | 56 gpu::Capabilities GetCapabilities() override; |
| 58 int32_t CreateImage(ClientBuffer buffer, | 57 int32_t CreateImage(ClientBuffer buffer, |
| 59 size_t width, | 58 size_t width, |
| 60 size_t height, | 59 size_t height, |
| 61 unsigned internalformat) override; | 60 unsigned internalformat) override; |
| 62 void DestroyImage(int32_t id) override; | 61 void DestroyImage(int32_t id) override; |
| 63 int32_t CreateGpuMemoryBufferImage(size_t width, | 62 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 64 size_t height, | 63 size_t height, |
| 65 unsigned internalformat, | 64 unsigned internalformat, |
| 66 unsigned usage) override; | 65 unsigned usage) override; |
| 67 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 66 void SignalQuery(uint32_t query, const base::Closure& callback) override; |
| 68 void SetLock(base::Lock*) override; | 67 void SetLock(base::Lock*) override; |
| 69 void EnsureWorkVisible() override; | 68 void EnsureWorkVisible() override; |
| 70 gpu::CommandBufferNamespace GetNamespaceID() const override; | 69 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 71 gpu::CommandBufferId GetCommandBufferID() const override; | 70 gpu::CommandBufferId GetCommandBufferID() const override; |
| 72 uint64_t GenerateFenceSyncRelease() override; | 71 uint64_t GenerateFenceSyncRelease() override; |
| 73 bool IsFenceSyncRelease(uint64_t release) override; | 72 bool IsFenceSyncRelease(uint64_t release) override; |
| 74 bool IsFenceSyncFlushed(uint64_t release) override; | 73 bool IsFenceSyncFlushed(uint64_t release) override; |
| 75 bool IsFenceSyncFlushReceived(uint64_t release) override; | 74 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| 75 bool IsFenceSyncReleased(uint64_t release) override; |
| 76 void SignalSyncToken(const gpu::SyncToken& sync_token, | 76 void SignalSyncToken(const gpu::SyncToken& sync_token, |
| 77 const base::Closure& callback) override; | 77 const base::Closure& callback) override; |
| 78 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; | 78 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; |
| 79 int32_t GetExtraCommandBufferData() const override; | 79 int32_t GetExtraCommandBufferData() const override; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 bool Send(IPC::Message* msg); | 82 bool Send(IPC::Message* msg); |
| 83 void UpdateState(const gpu::CommandBuffer::State& state, bool success); | 83 void UpdateState(const gpu::CommandBuffer::State& state, bool success); |
| 84 | 84 |
| 85 // Try to read an updated copy of the state from shared memory. | 85 // Try to read an updated copy of the state from shared memory. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 108 uint64_t flushed_fence_sync_release_; | 108 uint64_t flushed_fence_sync_release_; |
| 109 uint64_t validated_fence_sync_release_; | 109 uint64_t validated_fence_sync_release_; |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); | 111 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace proxy | 114 } // namespace proxy |
| 115 } // namespace ppapi | 115 } // namespace ppapi |
| 116 | 116 |
| 117 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 117 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |