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

Side by Side Diff: gpu/ipc/service/gpu_command_buffer_stub.h

Issue 2722883002: gpu: Allow waiting on sync tokens without sync token client. (Closed)
Patch Set: review Created 3 years, 9 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_test_common.cc ('k') | gpu/ipc/service/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_
6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ 6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 int32_t end, 160 int32_t end,
161 IPC::Message* reply_message); 161 IPC::Message* reply_message);
162 void OnAsyncFlush(int32_t put_offset, 162 void OnAsyncFlush(int32_t put_offset,
163 uint32_t flush_count, 163 uint32_t flush_count,
164 const std::vector<ui::LatencyInfo>& latency_info); 164 const std::vector<ui::LatencyInfo>& latency_info);
165 void OnRegisterTransferBuffer(int32_t id, 165 void OnRegisterTransferBuffer(int32_t id,
166 base::SharedMemoryHandle transfer_buffer, 166 base::SharedMemoryHandle transfer_buffer,
167 uint32_t size); 167 uint32_t size);
168 void OnDestroyTransferBuffer(int32_t id); 168 void OnDestroyTransferBuffer(int32_t id);
169 void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message); 169 void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message);
170 bool OnWaitSyncToken(const SyncToken& sync_token);
170 171
171 void OnEnsureBackbuffer(); 172 void OnEnsureBackbuffer();
172 173
173 void OnWaitSyncToken(const SyncToken& sync_token);
174 void OnSignalSyncToken(const SyncToken& sync_token, uint32_t id); 174 void OnSignalSyncToken(const SyncToken& sync_token, uint32_t id);
175 void OnSignalAck(uint32_t id); 175 void OnSignalAck(uint32_t id);
176 void OnSignalQuery(uint32_t query, uint32_t id); 176 void OnSignalQuery(uint32_t query, uint32_t id);
177 177
178 void OnFenceSyncRelease(uint64_t release); 178 void OnFenceSyncRelease(uint64_t release);
179 bool OnWaitFenceSync(CommandBufferNamespace namespace_id, 179 void OnWaitSyncTokenCompleted(const SyncToken& sync_token);
180 CommandBufferId command_buffer_id,
181 uint64_t release);
182 void OnWaitFenceSyncCompleted(CommandBufferNamespace namespace_id,
183 CommandBufferId command_buffer_id,
184 uint64_t release);
185 180
186 void OnDescheduleUntilFinished(); 181 void OnDescheduleUntilFinished();
187 void OnRescheduleAfterFinished(); 182 void OnRescheduleAfterFinished();
188 183
189 void OnCreateImage(const GpuCommandBufferMsg_CreateImage_Params& params); 184 void OnCreateImage(const GpuCommandBufferMsg_CreateImage_Params& params);
190 void OnDestroyImage(int32_t id); 185 void OnDestroyImage(int32_t id);
191 void OnCreateStreamTexture(uint32_t texture_id, 186 void OnCreateStreamTexture(uint32_t texture_id,
192 int32_t stream_id, 187 int32_t stream_id,
193 bool* succeeded); 188 bool* succeeded);
194 void OnCommandProcessed(); 189 void OnCommandProcessed();
195 void OnParseError(); 190 void OnParseError();
196 191
197 void ReportState(); 192 void ReportState();
198 193
199 // Wrapper for CommandExecutor::PutChanged that sets the crash report URL. 194 // Wrapper for CommandExecutor::PutChanged that sets the crash report URL.
200 void PutChanged(); 195 void PutChanged();
201 196
202 // Poll the command buffer to execute work. 197 // Poll the command buffer to execute work.
203 void PollWork(); 198 void PollWork();
204 void PerformWork(); 199 void PerformWork();
205 200
206 // Schedule processing of delayed work. This updates the time at which 201 // Schedule processing of delayed work. This updates the time at which
207 // delayed work should be processed. |process_delayed_work_time_| is 202 // delayed work should be processed. |process_delayed_work_time_| is
208 // updated to current time + delay. Call this after processing some amount 203 // updated to current time + delay. Call this after processing some amount
209 // of delayed work. 204 // of delayed work.
210 void ScheduleDelayedWork(base::TimeDelta delay); 205 void ScheduleDelayedWork(base::TimeDelta delay);
211 206
212 bool CheckContextLost(); 207 bool CheckContextLost();
213 void CheckCompleteWaits(); 208 void CheckCompleteWaits();
214 void PullTextureUpdates(CommandBufferNamespace namespace_id,
215 CommandBufferId command_buffer_id,
216 uint32_t release);
217 209
218 // The lifetime of objects of this class is managed by a GpuChannel. The 210 // The lifetime of objects of this class is managed by a GpuChannel. The
219 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they 211 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they
220 // are destroyed. So a raw pointer is safe. 212 // are destroyed. So a raw pointer is safe.
221 GpuChannel* const channel_; 213 GpuChannel* const channel_;
222 214
223 // The group of contexts that share namespaces with this context. 215 // The group of contexts that share namespaces with this context.
224 scoped_refptr<gles2::ContextGroup> context_group_; 216 scoped_refptr<gles2::ContextGroup> context_group_;
225 217
226 bool initialized_; 218 bool initialized_;
(...skipping 26 matching lines...) Expand all
253 245
254 std::unique_ptr<WaitForCommandState> wait_for_token_; 246 std::unique_ptr<WaitForCommandState> wait_for_token_;
255 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; 247 std::unique_ptr<WaitForCommandState> wait_for_get_offset_;
256 248
257 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 249 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
258 }; 250 };
259 251
260 } // namespace gpu 252 } // namespace gpu
261 253
262 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ 254 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel_test_common.cc ('k') | gpu/ipc/service/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698