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

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added mojo README.chromium changes, fixed and added test for missing order number release case Created 5 years, 3 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
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 9c6bf41e5d6de3cf25871e1aa2ffad8eeca1b3cb..f500eb2f1d5d5c780a53107d0fd675831b841238 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -111,7 +111,9 @@ GLManager::Options::Options()
context_lost_allowed(false),
context_type(gles2::CONTEXT_TYPE_OPENGLES2) {}
-GLManager::GLManager() : context_lost_allowed_(false) {
+GLManager::GLManager()
+ : context_lost_allowed_(false),
+ next_fence_sync_release_(1) {
SetupBaseContext();
}
@@ -444,4 +446,16 @@ uint64_t GLManager::GetCommandBufferID() const {
return 0;
}
+uint64_t GLManager::GenerateFenceSyncRelease() {
+ return next_fence_sync_release_++;
+}
+
+bool GLManager::IsFenceSyncRelease(uint64_t release) {
+ return release > 0 && release < next_fence_sync_release_;
+}
+
+bool GLManager::IsFenceSyncFlushed(uint64_t release) {
+ return IsFenceSyncRelease(release);
+}
+
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698