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 |
11 #include <map> | 11 #include <map> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
18 #include "components/mus/gles2/command_buffer_driver.h" | 18 #include "components/mus/gles2/command_buffer_driver.h" |
19 #include "components/mus/public/interfaces/command_buffer.mojom.h" | 19 #include "components/mus/public/interfaces/command_buffer.mojom.h" |
20 #include "gpu/command_buffer/client/gpu_control.h" | 20 #include "gpu/command_buffer/client/gpu_control.h" |
21 #include "gpu/command_buffer/common/command_buffer.h" | 21 #include "gpu/command_buffer/common/command_buffer.h" |
| 22 #include "gpu/command_buffer/common/command_buffer_id.h" |
22 #include "gpu/command_buffer/common/command_buffer_shared.h" | 23 #include "gpu/command_buffer/common/command_buffer_shared.h" |
23 #include "ui/gfx/geometry/size.h" | 24 #include "ui/gfx/geometry/size.h" |
24 #include "ui/gfx/gpu_memory_buffer.h" | 25 #include "ui/gfx/gpu_memory_buffer.h" |
25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
26 | 27 |
27 namespace { | 28 namespace { |
28 class WaitableEvent; | 29 class WaitableEvent; |
29 } | 30 } |
30 | 31 |
31 namespace gfx { | 32 namespace gfx { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void DestroyImage(int32_t id) override; | 82 void DestroyImage(int32_t id) override; |
82 int32_t CreateGpuMemoryBufferImage(size_t width, | 83 int32_t CreateGpuMemoryBufferImage(size_t width, |
83 size_t height, | 84 size_t height, |
84 unsigned internal_format, | 85 unsigned internal_format, |
85 unsigned usage) override; | 86 unsigned usage) override; |
86 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; | 87 void SignalQuery(uint32_t query_id, const base::Closure& callback) override; |
87 void SetLock(base::Lock*) override; | 88 void SetLock(base::Lock*) override; |
88 bool IsGpuChannelLost() override; | 89 bool IsGpuChannelLost() override; |
89 void EnsureWorkVisible() override; | 90 void EnsureWorkVisible() override; |
90 gpu::CommandBufferNamespace GetNamespaceID() const override; | 91 gpu::CommandBufferNamespace GetNamespaceID() const override; |
91 uint64_t GetCommandBufferID() const override; | 92 gpu::CommandBufferId GetCommandBufferID() const override; |
92 int32_t GetExtraCommandBufferData() const override; | 93 int32_t GetExtraCommandBufferData() const override; |
93 uint64_t GenerateFenceSyncRelease() override; | 94 uint64_t GenerateFenceSyncRelease() override; |
94 bool IsFenceSyncRelease(uint64_t release) override; | 95 bool IsFenceSyncRelease(uint64_t release) override; |
95 bool IsFenceSyncFlushed(uint64_t release) override; | 96 bool IsFenceSyncFlushed(uint64_t release) override; |
96 bool IsFenceSyncFlushReceived(uint64_t release) override; | 97 bool IsFenceSyncFlushReceived(uint64_t release) override; |
97 void SignalSyncToken(const gpu::SyncToken& sync_token, | 98 void SignalSyncToken(const gpu::SyncToken& sync_token, |
98 const base::Closure& callback) override; | 99 const base::Closure& callback) override; |
99 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; | 100 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; |
100 | 101 |
101 // CommandBufferDriver::Client implementation: | 102 // CommandBufferDriver::Client implementation: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // This weak factory will be invalidated in the client thread, so all weak | 160 // This weak factory will be invalidated in the client thread, so all weak |
160 // pointers have to be dereferenced in the client thread too. | 161 // pointers have to be dereferenced in the client thread too. |
161 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; | 162 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; |
162 | 163 |
163 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); | 164 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); |
164 }; | 165 }; |
165 | 166 |
166 } // namespace mus | 167 } // namespace mus |
167 | 168 |
168 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ | 169 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ |
OLD | NEW |