| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bool is_offscreen, | 91 bool is_offscreen, |
| 92 SurfaceHandle window, | 92 SurfaceHandle window, |
| 93 const gles2::ContextCreationAttribHelper& attribs, | 93 const gles2::ContextCreationAttribHelper& attribs, |
| 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; | |
| 102 void Flush(int32_t put_offset) override; | 101 void Flush(int32_t put_offset) override; |
| 103 void OrderingBarrier(int32_t put_offset) override; | 102 void OrderingBarrier(int32_t put_offset) override; |
| 104 void WaitForTokenInRange(int32_t start, int32_t end) override; | 103 State WaitForTokenInRange(int32_t start, int32_t end) override; |
| 105 void WaitForGetOffsetInRange(int32_t start, int32_t end) override; | 104 State WaitForGetOffsetInRange(int32_t start, int32_t end) override; |
| 106 void SetGetBuffer(int32_t shm_id) override; | 105 void SetGetBuffer(int32_t shm_id) override; |
| 107 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 106 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
| 108 int32_t* id) override; | 107 int32_t* id) override; |
| 109 void DestroyTransferBuffer(int32_t id) override; | 108 void DestroyTransferBuffer(int32_t id) override; |
| 110 gpu::error::Error GetLastError() override; | |
| 111 | 109 |
| 112 // GpuControl implementation: | 110 // GpuControl implementation: |
| 113 // NOTE: The GpuControlClient will be called on the client thread. | 111 // NOTE: The GpuControlClient will be called on the client thread. |
| 114 void SetGpuControlClient(GpuControlClient*) override; | 112 void SetGpuControlClient(GpuControlClient*) override; |
| 115 gpu::Capabilities GetCapabilities() override; | 113 gpu::Capabilities GetCapabilities() override; |
| 116 int32_t CreateImage(ClientBuffer buffer, | 114 int32_t CreateImage(ClientBuffer buffer, |
| 117 size_t width, | 115 size_t width, |
| 118 size_t height, | 116 size_t height, |
| 119 unsigned internalformat) override; | 117 unsigned internalformat) override; |
| 120 void DestroyImage(int32_t id) override; | 118 void DestroyImage(int32_t id) override; |
| 121 int32_t CreateGpuMemoryBufferImage(size_t width, | 119 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 122 size_t height, | 120 size_t height, |
| 123 unsigned internalformat, | 121 unsigned internalformat, |
| 124 unsigned usage) override; | 122 unsigned usage) override; |
| 125 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; | 123 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; |
| 126 void SetLock(base::Lock*) override; | 124 void SetLock(base::Lock*) override; |
| 127 void EnsureWorkVisible() override; | 125 void EnsureWorkVisible() override; |
| 128 CommandBufferNamespace GetNamespaceID() const override; | 126 CommandBufferNamespace GetNamespaceID() const override; |
| 129 CommandBufferId GetCommandBufferID() const override; | 127 CommandBufferId GetCommandBufferID() const override; |
| 130 int32_t GetExtraCommandBufferData() const override; | 128 int32_t GetExtraCommandBufferData() const override; |
| 131 uint64_t GenerateFenceSyncRelease() override; | 129 uint64_t GenerateFenceSyncRelease() override; |
| 132 bool IsFenceSyncRelease(uint64_t release) override; | 130 bool IsFenceSyncRelease(uint64_t release) override; |
| 133 bool IsFenceSyncFlushed(uint64_t release) override; | 131 bool IsFenceSyncFlushed(uint64_t release) override; |
| 134 bool IsFenceSyncFlushReceived(uint64_t release) override; | 132 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| 133 bool IsFenceSyncReleased(uint64_t release) override; |
| 135 void SignalSyncToken(const SyncToken& sync_token, | 134 void SignalSyncToken(const SyncToken& sync_token, |
| 136 const base::Closure& callback) override; | 135 const base::Closure& callback) override; |
| 137 bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) override; | 136 bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) override; |
| 138 | 137 |
| 139 // ImageTransportSurfaceDelegate implementation: | 138 // ImageTransportSurfaceDelegate implementation: |
| 140 #if defined(OS_WIN) | 139 #if defined(OS_WIN) |
| 141 void DidCreateAcceleratedSurfaceChildWindow( | 140 void DidCreateAcceleratedSurfaceChildWindow( |
| 142 SurfaceHandle parent_window, | 141 SurfaceHandle parent_window, |
| 143 SurfaceHandle child_window) override; | 142 SurfaceHandle child_window) override; |
| 144 #endif | 143 #endif |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 335 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
| 337 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; | 336 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; |
| 338 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 337 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
| 339 | 338 |
| 340 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 339 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
| 341 }; | 340 }; |
| 342 | 341 |
| 343 } // namespace gpu | 342 } // namespace gpu |
| 344 | 343 |
| 345 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 344 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |