| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ | 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ |
| 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ | 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void DestroyImage(int32_t id) override; | 81 void DestroyImage(int32_t id) override; |
| 82 int32_t CreateGpuMemoryBufferImage(size_t width, | 82 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 83 size_t height, | 83 size_t height, |
| 84 unsigned internal_format, | 84 unsigned internal_format, |
| 85 unsigned usage) override; | 85 unsigned usage) override; |
| 86 uint32_t InsertSyncPoint() override; | 86 uint32_t InsertSyncPoint() override; |
| 87 uint32_t InsertFutureSyncPoint() override; | 87 uint32_t InsertFutureSyncPoint() override; |
| 88 void RetireSyncPoint(uint32_t sync_point) override; | 88 void RetireSyncPoint(uint32_t sync_point) override; |
| 89 void SignalSyncPoint(uint32_t sync_point, | 89 void SignalSyncPoint(uint32_t sync_point, |
| 90 const base::Closure& callback) override; | 90 const base::Closure& callback) override; |
| 91 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 91 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; |
| 92 void SetLock(base::Lock*) override; | 92 void SetLock(base::Lock*) override; |
| 93 bool IsGpuChannelLost() override; | 93 bool IsGpuChannelLost() override; |
| 94 void EnsureWorkVisible() override; | 94 void EnsureWorkVisible() override; |
| 95 gpu::CommandBufferNamespace GetNamespaceID() const override; | 95 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 96 uint64_t GetCommandBufferID() const override; | 96 uint64_t GetCommandBufferID() const override; |
| 97 int32_t GetExtraCommandBufferData() const override; | 97 int32_t GetExtraCommandBufferData() const override; |
| 98 uint64_t GenerateFenceSyncRelease() override; | 98 uint64_t GenerateFenceSyncRelease() override; |
| 99 bool IsFenceSyncRelease(uint64_t release) override; | 99 bool IsFenceSyncRelease(uint64_t release) override; |
| 100 bool IsFenceSyncFlushed(uint64_t release) override; | 100 bool IsFenceSyncFlushed(uint64_t release) override; |
| 101 bool IsFenceSyncFlushReceived(uint64_t release) override; | 101 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 126 bool CreateImageOnGpuThread(int32_t id, | 126 bool CreateImageOnGpuThread(int32_t id, |
| 127 mojo::ScopedHandle memory_handle, | 127 mojo::ScopedHandle memory_handle, |
| 128 int32_t type, | 128 int32_t type, |
| 129 mojo::SizePtr size, | 129 mojo::SizePtr size, |
| 130 int32_t format, | 130 int32_t format, |
| 131 int32_t internal_format); | 131 int32_t internal_format); |
| 132 bool DestroyImageOnGpuThread(int32_t id); | 132 bool DestroyImageOnGpuThread(int32_t id); |
| 133 bool MakeProgressOnGpuThread(base::WaitableEvent* event, | 133 bool MakeProgressOnGpuThread(base::WaitableEvent* event, |
| 134 gpu::CommandBuffer::State* state); | 134 gpu::CommandBuffer::State* state); |
| 135 bool DeleteOnGpuThread(); | 135 bool DeleteOnGpuThread(); |
| 136 bool SignalQueryOnGpuThread(uint32_t query_id, const base::Closure& callback); |
| 136 | 137 |
| 137 // Helper functions are called in the client thread. | 138 // Helper functions are called in the client thread. |
| 138 void DidLoseContextOnClientThread(uint32_t reason); | 139 void DidLoseContextOnClientThread(uint32_t reason); |
| 139 void UpdateVSyncParametersOnClientThread(int64_t timebase, int64_t interval); | 140 void UpdateVSyncParametersOnClientThread(int64_t timebase, int64_t interval); |
| 140 | 141 |
| 141 gfx::AcceleratedWidget widget_; | 142 gfx::AcceleratedWidget widget_; |
| 142 scoped_refptr<GpuState> gpu_state_; | 143 scoped_refptr<GpuState> gpu_state_; |
| 143 scoped_ptr<CommandBufferDriver> driver_; | 144 scoped_ptr<CommandBufferDriver> driver_; |
| 144 CommandBufferLocalClient* client_; | 145 CommandBufferLocalClient* client_; |
| 145 scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_; | 146 scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 163 // This weak factory will be invalidated in the client thread, so all weak | 164 // This weak factory will be invalidated in the client thread, so all weak |
| 164 // pointers have to be dereferenced in the client thread too. | 165 // pointers have to be dereferenced in the client thread too. |
| 165 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; | 166 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; |
| 166 | 167 |
| 167 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); | 168 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 } // namespace mus | 171 } // namespace mus |
| 171 | 172 |
| 172 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ | 173 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ |
| OLD | NEW |