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

Unified Diff: content/common/gpu/client/gpu_context_tests.h

Issue 1459043003: Revert "Replaced blink sync points with new sync tokens." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/common/gpu/client/gpu_context_tests.h
diff --git a/content/common/gpu/client/gpu_context_tests.h b/content/common/gpu/client/gpu_context_tests.h
index 372c34edb329f1f1814236dd3489f273bc165c71..814f59a0cb2535690dc9855330bd4771451fe5d7 100644
--- a/content/common/gpu/client/gpu_context_tests.h
+++ b/content/common/gpu/client/gpu_context_tests.h
@@ -23,9 +23,9 @@ class SignalTest : public ContextTestBase {
}
// These tests should time out if the callback doesn't get called.
- void TestSignalSyncToken(const gpu::SyncToken& sync_token) {
+ void TestSignalSyncPoint(unsigned sync_point) {
base::RunLoop run_loop;
- context_support_->SignalSyncToken(sync_token, run_loop.QuitClosure());
+ context_support_->SignalSyncPoint(sync_point, run_loop.QuitClosure());
run_loop.Run();
}
@@ -40,39 +40,22 @@ class SignalTest : public ContextTestBase {
}
};
-CONTEXT_TEST_F(SignalTest, BasicSignalSyncTokenTest) {
+CONTEXT_TEST_F(SignalTest, BasicSignalSyncPointTest) {
if (!context_)
return;
- const blink::WGC3Duint64 fence_sync = context_->insertFenceSyncCHROMIUM();
- context_->shallowFlushCHROMIUM();
-
- gpu::SyncToken sync_token;
- ASSERT_TRUE(context_->genSyncTokenCHROMIUM(fence_sync, sync_token.GetData()));
-
- TestSignalSyncToken(sync_token);
-};
-
-CONTEXT_TEST_F(SignalTest, EmptySignalSyncTokenTest) {
- if (!context_)
- return;
-
- // Signalling something that doesn't exist should run the callback
- // immediately.
gpu::SyncToken sync_token;
- TestSignalSyncToken(sync_token);
+ ASSERT_TRUE(context_->insertSyncPoint(sync_token.GetData()));
+ TestSignalSyncPoint(static_cast<unsigned>(sync_token.release_count()));
};
-CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) {
+CONTEXT_TEST_F(SignalTest, InvalidSignalSyncPointTest) {
if (!context_)
return;
// Signalling something that doesn't exist should run the callback
// immediately.
- gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
- 1297824234,
- 9123743439);
- TestSignalSyncToken(sync_token);
+ TestSignalSyncPoint(1297824234);
};
CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) {
« no previous file with comments | « content/common/gpu/client/gl_helper_unittest.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698