OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |