Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: components/mus/gles2/command_buffer_local.h

Issue 1610783002: mustash: gpu: implement SignalQuery in CommandBufferLocal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run on GPU thread. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 25 matching lines...) Expand all
127 bool CreateImageOnGpuThread(int32_t id, 127 bool CreateImageOnGpuThread(int32_t id,
128 mojo::ScopedHandle memory_handle, 128 mojo::ScopedHandle memory_handle,
129 int32_t type, 129 int32_t type,
130 mojo::SizePtr size, 130 mojo::SizePtr size,
131 int32_t format, 131 int32_t format,
132 int32_t internal_format); 132 int32_t internal_format);
133 bool DestroyImageOnGpuThread(int32_t id); 133 bool DestroyImageOnGpuThread(int32_t id);
134 bool MakeProgressOnGpuThread(base::WaitableEvent* event, 134 bool MakeProgressOnGpuThread(base::WaitableEvent* event,
135 gpu::CommandBuffer::State* state); 135 gpu::CommandBuffer::State* state);
136 bool DeleteOnGpuThread(); 136 bool DeleteOnGpuThread();
137 bool SignalQueryOnGpuThread(uint32_t query_id, const base::Closure& callback);
137 138
138 // Helper functions are called in the client thread. 139 // Helper functions are called in the client thread.
139 void DidLoseContextOnClientThread(uint32_t reason); 140 void DidLoseContextOnClientThread(uint32_t reason);
140 void UpdateVSyncParametersOnClientThread(int64_t timebase, int64_t interval); 141 void UpdateVSyncParametersOnClientThread(int64_t timebase, int64_t interval);
141 142
142 gfx::AcceleratedWidget widget_; 143 gfx::AcceleratedWidget widget_;
143 scoped_refptr<GpuState> gpu_state_; 144 scoped_refptr<GpuState> gpu_state_;
144 scoped_ptr<CommandBufferDriver> driver_; 145 scoped_ptr<CommandBufferDriver> driver_;
145 CommandBufferLocalClient* client_; 146 CommandBufferLocalClient* client_;
146 scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_; 147 scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_;
(...skipping 18 matching lines...) Expand all
165 // This weak factory will be invalidated in the client thread, so all weak 166 // This weak factory will be invalidated in the client thread, so all weak
166 // pointers have to be dereferenced in the client thread too. 167 // pointers have to be dereferenced in the client thread too.
167 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; 168 base::WeakPtrFactory<CommandBufferLocal> weak_factory_;
168 169
169 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); 170 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal);
170 }; 171 };
171 172
172 } // namespace mus 173 } // namespace mus
173 174
174 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ 175 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698