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 <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void RetireSyncPoint(uint32 sync_point) override; | 66 void RetireSyncPoint(uint32 sync_point) override; |
67 void SignalSyncPoint(uint32 sync_point, | 67 void SignalSyncPoint(uint32 sync_point, |
68 const base::Closure& callback) override; | 68 const base::Closure& callback) override; |
69 void SignalQuery(uint32 query, const base::Closure& callback) override; | 69 void SignalQuery(uint32 query, const base::Closure& callback) override; |
70 void SetSurfaceVisible(bool visible) override; | 70 void SetSurfaceVisible(bool visible) override; |
71 uint32 CreateStreamTexture(uint32 texture_id) override; | 71 uint32 CreateStreamTexture(uint32 texture_id) override; |
72 void SetLock(base::Lock*) override; | 72 void SetLock(base::Lock*) override; |
73 bool IsGpuChannelLost() override; | 73 bool IsGpuChannelLost() override; |
74 gpu::CommandBufferNamespace GetNamespaceID() const override; | 74 gpu::CommandBufferNamespace GetNamespaceID() const override; |
75 uint64_t GetCommandBufferID() const override; | 75 uint64_t GetCommandBufferID() const override; |
| 76 uint64_t GenerateFenceSyncRelease() override; |
| 77 bool IsFenceSyncRelease(uint64_t release) override; |
| 78 bool IsFenceSyncFlushed(uint64_t release) override; |
76 | 79 |
77 private: | 80 private: |
78 void PumpCommands(); | 81 void PumpCommands(); |
79 | 82 |
80 void OnResize(gfx::Size size, float scale_factor); | 83 void OnResize(gfx::Size size, float scale_factor); |
81 void OnUpdateVSyncParameters(const base::TimeTicks timebase, | 84 void OnUpdateVSyncParameters(const base::TimeTicks timebase, |
82 const base::TimeDelta interval); | 85 const base::TimeDelta interval); |
83 bool OnWaitSyncPoint(uint32_t sync_point); | 86 bool OnWaitSyncPoint(uint32_t sync_point); |
| 87 void OnFenceSyncRelease(uint64_t release); |
| 88 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, |
| 89 uint64_t command_buffer_id, |
| 90 uint64_t release); |
84 void OnParseError(); | 91 void OnParseError(); |
85 void OnContextLost(uint32_t reason); | 92 void OnContextLost(uint32_t reason); |
86 void OnSyncPointRetired(); | 93 void OnSyncPointRetired(); |
87 | 94 |
88 gfx::AcceleratedWidget widget_; | 95 gfx::AcceleratedWidget widget_; |
89 scoped_refptr<GpuState> gpu_state_; | 96 scoped_refptr<GpuState> gpu_state_; |
90 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 97 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
91 scoped_ptr<gpu::GpuScheduler> scheduler_; | 98 scoped_ptr<gpu::GpuScheduler> scheduler_; |
92 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 99 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
93 scoped_refptr<gfx::GLContext> context_; | 100 scoped_refptr<gfx::GLContext> context_; |
94 scoped_refptr<gfx::GLSurface> surface_; | 101 scoped_refptr<gfx::GLSurface> surface_; |
95 CommandBufferLocalClient* client_; | 102 CommandBufferLocalClient* client_; |
96 | 103 |
| 104 uint64_t next_fence_sync_release_; |
| 105 |
97 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; | 106 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; |
98 | 107 |
99 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); | 108 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); |
100 }; | 109 }; |
101 | 110 |
102 } // namespace mus | 111 } // namespace mus |
103 | 112 |
104 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ | 113 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ |
OLD | NEW |