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

Unified Diff: gpu/command_buffer/service/sync_point_manager.h

Issue 1975663002: Invalid sync token waits now automatically get released. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combine the 2 while loops into 1 Created 4 years, 7 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 | « no previous file | gpu/command_buffer/service/sync_point_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/sync_point_manager.h
diff --git a/gpu/command_buffer/service/sync_point_manager.h b/gpu/command_buffer/service/sync_point_manager.h
index a004a379058537b36aa827143ada24f0d1b8a03c..7a3695c9886207853dff2f86dffdc98b2bcd1689 100644
--- a/gpu/command_buffer/service/sync_point_manager.h
+++ b/gpu/command_buffer/service/sync_point_manager.h
@@ -73,10 +73,12 @@ class GPU_EXPORT SyncPointOrderData
struct OrderFence {
uint32_t order_num;
uint64_t fence_release;
+ base::Closure release_callback;
scoped_refptr<SyncPointClientState> client_state;
OrderFence(uint32_t order,
uint64_t release,
+ const base::Closure& release_callback,
scoped_refptr<SyncPointClientState> state);
OrderFence(const OrderFence& other);
~OrderFence();
@@ -97,7 +99,8 @@ class GPU_EXPORT SyncPointOrderData
bool ValidateReleaseOrderNumber(
scoped_refptr<SyncPointClientState> client_state,
uint32_t wait_order_num,
- uint64_t fence_release);
+ uint64_t fence_release,
+ const base::Closure& release_callback);
// Non thread-safe functions need to be called from a single thread.
base::ThreadChecker processing_thread_checker_;
@@ -182,10 +185,12 @@ class GPU_EXPORT SyncPointClientState
uint64_t release,
const base::Closure& callback);
+ // Releases a fence sync and all fence syncs below.
void ReleaseFenceSync(uint64_t release);
- void EnsureReleased(uint64_t release);
- void ReleaseFenceSyncLocked(uint64_t release,
- std::vector<base::Closure>* callback_list);
+
+ // Does not release the fence sync, but releases callbacks waiting on that
+ // fence sync.
+ void EnsureWaitReleased(uint64_t release, const base::Closure& callback);
typedef base::Callback<void(CommandBufferNamespace, CommandBufferId)>
OnWaitCallback;
« no previous file with comments | « no previous file | gpu/command_buffer/service/sync_point_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698