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

Unified Diff: gpu/ipc/client/command_buffer_proxy_impl.cc

Issue 1933473002: Added more strict checks for fence sync counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add thread_checker header Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/service/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/client/command_buffer_proxy_impl.cc
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc
index bc36560e8395db6fa61e01227c68b5fb80c56d06..b9f0da37c5861c9946426aa321617d4e848aafdf 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.cc
+++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -427,7 +427,7 @@ int32_t CommandBufferProxyImpl::CreateImage(ClientBuffer buffer,
image_fence_sync = GenerateFenceSyncRelease();
// Make sure fence syncs were flushed before CreateImage() was called.
- DCHECK_LE(image_fence_sync - 1, flushed_fence_sync_release_);
+ DCHECK_EQ(image_fence_sync, flushed_fence_sync_release_ + 1);
}
DCHECK(gpu::IsGpuMemoryBufferFormatSupported(gpu_memory_buffer->GetFormat(),
@@ -529,14 +529,17 @@ int32_t CommandBufferProxyImpl::GetExtraCommandBufferData() const {
}
uint64_t CommandBufferProxyImpl::GenerateFenceSyncRelease() {
+ CheckLock();
return next_fence_sync_release_++;
}
bool CommandBufferProxyImpl::IsFenceSyncRelease(uint64_t release) {
+ CheckLock();
return release != 0 && release < next_fence_sync_release_;
}
bool CommandBufferProxyImpl::IsFenceSyncFlushed(uint64_t release) {
+ CheckLock();
return release != 0 && release <= flushed_fence_sync_release_;
}
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/service/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698