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

Side by Side Diff: ppapi/proxy/ppapi_command_buffer_proxy.cc

Issue 1559893003: Added method to synchronize command buffers within GpuControl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SynchronizeCommandBuffer() -> EnsureWorkVisible() 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
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.h ('k') | no next file » | 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 #include "ppapi/proxy/ppapi_command_buffer_proxy.h" 5 #include "ppapi/proxy/ppapi_command_buffer_proxy.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 void PpapiCommandBufferProxy::SetLock(base::Lock*) { 177 void PpapiCommandBufferProxy::SetLock(base::Lock*) {
178 NOTIMPLEMENTED(); 178 NOTIMPLEMENTED();
179 } 179 }
180 180
181 bool PpapiCommandBufferProxy::IsGpuChannelLost() { 181 bool PpapiCommandBufferProxy::IsGpuChannelLost() {
182 NOTIMPLEMENTED(); 182 NOTIMPLEMENTED();
183 return false; 183 return false;
184 } 184 }
185 185
186 void PpapiCommandBufferProxy::EnsureWorkVisible() {
187 NOTIMPLEMENTED();
188 }
189
186 gpu::CommandBufferNamespace PpapiCommandBufferProxy::GetNamespaceID() const { 190 gpu::CommandBufferNamespace PpapiCommandBufferProxy::GetNamespaceID() const {
187 return gpu::CommandBufferNamespace::GPU_IO; 191 return gpu::CommandBufferNamespace::GPU_IO;
188 } 192 }
189 193
190 uint64_t PpapiCommandBufferProxy::GetCommandBufferID() const { 194 uint64_t PpapiCommandBufferProxy::GetCommandBufferID() const {
191 return command_buffer_id_; 195 return command_buffer_id_;
192 } 196 }
193 197
194 uint64_t PpapiCommandBufferProxy::GenerateFenceSyncRelease() { 198 uint64_t PpapiCommandBufferProxy::GenerateFenceSyncRelease() {
195 return next_fence_sync_release_++; 199 return next_fence_sync_release_++;
196 } 200 }
197 201
198 bool PpapiCommandBufferProxy::IsFenceSyncRelease(uint64_t release) { 202 bool PpapiCommandBufferProxy::IsFenceSyncRelease(uint64_t release) {
199 return release != 0 && release < next_fence_sync_release_; 203 return release != 0 && release < next_fence_sync_release_;
200 } 204 }
201 205
202 bool PpapiCommandBufferProxy::IsFenceSyncFlushed(uint64_t release) { 206 bool PpapiCommandBufferProxy::IsFenceSyncFlushed(uint64_t release) {
203 return release <= flushed_fence_sync_release_; 207 return release <= flushed_fence_sync_release_;
204 } 208 }
205 209
206 bool PpapiCommandBufferProxy::IsFenceSyncFlushReceived(uint64_t release) { 210 bool PpapiCommandBufferProxy::IsFenceSyncFlushReceived(uint64_t release) {
211 // TODO(dyen): This needs a synchronous NOP to the PpapiHost which
212 // also sends a synchronous NOP to the actual server.
207 return IsFenceSyncFlushed(release); 213 return IsFenceSyncFlushed(release);
208 } 214 }
209 215
210 void PpapiCommandBufferProxy::SignalSyncToken(const gpu::SyncToken& sync_token, 216 void PpapiCommandBufferProxy::SignalSyncToken(const gpu::SyncToken& sync_token,
211 const base::Closure& callback) { 217 const base::Closure& callback) {
212 NOTIMPLEMENTED(); 218 NOTIMPLEMENTED();
213 } 219 }
214 220
215 bool PpapiCommandBufferProxy::CanWaitUnverifiedSyncToken( 221 bool PpapiCommandBufferProxy::CanWaitUnverifiedSyncToken(
216 const gpu::SyncToken* sync_token) { 222 const gpu::SyncToken* sync_token) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 message->set_unblock(true); 342 message->set_unblock(true);
337 Send(message); 343 Send(message);
338 344
339 flush_info_->flush_pending = false; 345 flush_info_->flush_pending = false;
340 flush_info_->resource.SetHostResource(0, 0); 346 flush_info_->resource.SetHostResource(0, 0);
341 flushed_fence_sync_release_ = pending_fence_sync_release_; 347 flushed_fence_sync_release_ = pending_fence_sync_release_;
342 } 348 }
343 349
344 } // namespace proxy 350 } // namespace proxy
345 } // namespace ppapi 351 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698