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

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

Issue 1429213002: Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed typo Created 5 years, 1 month 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/command_buffer/service/sync_point_manager.h ('k') | media/base/video_frame.h » ('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.cc
diff --git a/gpu/command_buffer/service/sync_point_manager.cc b/gpu/command_buffer/service/sync_point_manager.cc
index bc73adb2dacc4dd1d84b2ffcd8077e40b67f7da5..3fa7539bb4c1bd9d766e8fab1f1ad8b27b4b4e4e 100644
--- a/gpu/command_buffer/service/sync_point_manager.cc
+++ b/gpu/command_buffer/service/sync_point_manager.cc
@@ -282,6 +282,29 @@ SyncPointClient::SyncPointClient(SyncPointManager* sync_point_manager,
namespace_id_(namespace_id),
client_id_(client_id) {}
+bool SyncPointClientWaiter::Wait(SyncPointClientState* release_state,
+ uint64_t release_count,
+ const base::Closure& wait_complete_callback) {
+ // No order number associated with the current execution context, using
+ // UINT32_MAX will just assume the release is in the SyncPointClientState's
+ // order numbers to be executed.
+ if (!release_state->WaitForRelease(UINT32_MAX, release_count,
+ wait_complete_callback)) {
+ wait_complete_callback.Run();
+ return false;
+ }
+ return true;
+}
+
+bool SyncPointClientWaiter::WaitNonThreadSafe(
+ SyncPointClientState* release_state,
+ uint64_t release_count,
+ scoped_refptr<base::SingleThreadTaskRunner> runner,
+ const base::Closure& wait_complete_callback) {
+ return Wait(release_state, release_count,
+ base::Bind(&RunOnThread, runner, wait_complete_callback));
+}
+
SyncPointManager::SyncPointManager(bool allow_threaded_wait)
: allow_threaded_wait_(allow_threaded_wait),
// To reduce the risk that a sync point created in a previous GPU process
« no previous file with comments | « gpu/command_buffer/service/sync_point_manager.h ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698