| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IN_PROCESS_COMMAND_BUFFER_H_ | 5 #ifndef GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
| 6 #define GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 6 #define GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 InProcessCommandBuffer* share_group, | 94 InProcessCommandBuffer* share_group, |
| 95 GpuMemoryBufferManager* gpu_memory_buffer_manager, | 95 GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 96 ImageFactory* image_factory, | 96 ImageFactory* image_factory, |
| 97 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 97 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 98 | 98 |
| 99 // CommandBuffer implementation: | 99 // CommandBuffer implementation: |
| 100 State GetLastState() override; | 100 State GetLastState() override; |
| 101 int32_t GetLastToken() override; | 101 int32_t GetLastToken() override; |
| 102 void Flush(int32_t put_offset) override; | 102 void Flush(int32_t put_offset) override; |
| 103 void OrderingBarrier(int32_t put_offset) override; | 103 void OrderingBarrier(int32_t put_offset) override; |
| 104 void WaitForTokenInRange(int32_t start, int32_t end) override; | 104 State WaitForTokenInRange(int32_t start, int32_t end) override; |
| 105 void WaitForGetOffsetInRange(int32_t start, int32_t end) override; | 105 State WaitForGetOffsetInRange(int32_t start, int32_t end) override; |
| 106 void SetGetBuffer(int32_t shm_id) override; | 106 void SetGetBuffer(int32_t shm_id) override; |
| 107 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 107 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
| 108 int32_t* id) override; | 108 int32_t* id) override; |
| 109 void DestroyTransferBuffer(int32_t id) override; | 109 void DestroyTransferBuffer(int32_t id) override; |
| 110 gpu::error::Error GetLastError() override; | 110 gpu::error::Error GetLastError() override; |
| 111 | 111 |
| 112 // GpuControl implementation: | 112 // GpuControl implementation: |
| 113 // NOTE: The GpuControlClient will be called on the client thread. | 113 // NOTE: The GpuControlClient will be called on the client thread. |
| 114 void SetGpuControlClient(GpuControlClient*) override; | 114 void SetGpuControlClient(GpuControlClient*) override; |
| 115 gpu::Capabilities GetCapabilities() override; | 115 gpu::Capabilities GetCapabilities() override; |
| 116 int32_t CreateImage(ClientBuffer buffer, | 116 int32_t CreateImage(ClientBuffer buffer, |
| 117 size_t width, | 117 size_t width, |
| 118 size_t height, | 118 size_t height, |
| 119 unsigned internalformat) override; | 119 unsigned internalformat) override; |
| 120 void DestroyImage(int32_t id) override; | 120 void DestroyImage(int32_t id) override; |
| 121 int32_t CreateGpuMemoryBufferImage(size_t width, | 121 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 122 size_t height, | 122 size_t height, |
| 123 unsigned internalformat, | 123 unsigned internalformat, |
| 124 unsigned usage) override; | 124 unsigned usage) override; |
| 125 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; | 125 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; |
| 126 void SetLock(base::Lock*) override; | 126 void SetLock(base::Lock*) override; |
| 127 void EnsureWorkVisible() override; | 127 void EnsureWorkVisible() override; |
| 128 CommandBufferNamespace GetNamespaceID() const override; | 128 CommandBufferNamespace GetNamespaceID() const override; |
| 129 CommandBufferId GetCommandBufferID() const override; | 129 CommandBufferId GetCommandBufferID() const override; |
| 130 int32_t GetExtraCommandBufferData() const override; | 130 int32_t GetExtraCommandBufferData() const override; |
| 131 uint64_t GenerateFenceSyncRelease() override; | 131 uint64_t GenerateFenceSyncRelease() override; |
| 132 bool IsFenceSyncRelease(uint64_t release) override; | 132 bool IsFenceSyncRelease(uint64_t release) override; |
| 133 bool IsFenceSyncFlushed(uint64_t release) override; | 133 bool IsFenceSyncFlushed(uint64_t release) override; |
| 134 bool IsFenceSyncFlushReceived(uint64_t release) override; | 134 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| 135 bool IsFenceSyncReleased(uint64_t release) override; |
| 135 void SignalSyncToken(const SyncToken& sync_token, | 136 void SignalSyncToken(const SyncToken& sync_token, |
| 136 const base::Closure& callback) override; | 137 const base::Closure& callback) override; |
| 137 bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) override; | 138 bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) override; |
| 138 | 139 |
| 139 // ImageTransportSurfaceDelegate implementation: | 140 // ImageTransportSurfaceDelegate implementation: |
| 140 #if defined(OS_WIN) | 141 #if defined(OS_WIN) |
| 141 void DidCreateAcceleratedSurfaceChildWindow( | 142 void DidCreateAcceleratedSurfaceChildWindow( |
| 142 SurfaceHandle parent_window, | 143 SurfaceHandle parent_window, |
| 143 SurfaceHandle child_window) override; | 144 SurfaceHandle child_window) override; |
| 144 #endif | 145 #endif |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 337 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
| 337 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; | 338 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; |
| 338 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 339 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
| 339 | 340 |
| 340 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 341 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
| 341 }; | 342 }; |
| 342 | 343 |
| 343 } // namespace gpu | 344 } // namespace gpu |
| 344 | 345 |
| 345 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 346 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |