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

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

Issue 1807813002: Remove WebGraphicsContext3D dependency in gpu_context_tests.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wgc3d-unused
Patch Set: Created 4 years, 9 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: 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 230d89522d317182533464ee744d681c606788e8..11cc3b981860a1fd31652187bb6933068b913c4c 100644
--- a/content/common/gpu/client/gpu_context_tests.h
+++ b/content/common/gpu/client/gpu_context_tests.h
@@ -31,7 +31,7 @@ class SignalTest : public ContextTestBase {
}
// These tests should time out if the callback doesn't get called.
- void TestSignalQuery(blink::WebGLId query) {
+ void TestSignalQuery(GLuint query) {
base::RunLoop run_loop;
context_support_->SignalQuery(
query,
@@ -42,22 +42,16 @@ class SignalTest : public ContextTestBase {
};
CONTEXT_TEST_F(SignalTest, BasicSignalSyncTokenTest) {
- if (!context_)
- return;
-
- const blink::WGC3Duint64 fence_sync = context_->insertFenceSyncCHROMIUM();
- context_->GetGLInterface()->ShallowFlushCHROMIUM();
+ const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM();
+ gl_->ShallowFlushCHROMIUM();
gpu::SyncToken sync_token;
- ASSERT_TRUE(context_->genSyncTokenCHROMIUM(fence_sync, sync_token.GetData()));
+ gl_->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;
@@ -65,9 +59,6 @@ CONTEXT_TEST_F(SignalTest, EmptySignalSyncTokenTest) {
};
CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) {
- if (!context_)
- return;
-
// Signalling something that doesn't exist should run the callback
// immediately.
gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
@@ -77,30 +68,23 @@ CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) {
};
CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) {
- if (!context_)
- return;
-
- unsigned query = context_->createQueryEXT();
- context_->beginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, query);
- context_->finish();
- context_->endQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM);
+ unsigned query;
+ gl_->GenQueriesEXT(1, &query);
+ gl_->BeginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, query);
+ gl_->Finish();
+ gl_->EndQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM);
TestSignalQuery(query);
- context_->deleteQueryEXT(query);
+ gl_->DeleteQueriesEXT(1, &query);
};
CONTEXT_TEST_F(SignalTest, SignalQueryUnboundTest) {
- if (!context_)
- return;
-
- blink::WebGLId query = context_->createQueryEXT();
+ GLuint query;
+ gl_->GenQueriesEXT(1, &query);
TestSignalQuery(query);
- context_->deleteQueryEXT(query);
+ gl_->DeleteQueriesEXT(1, &query);
};
CONTEXT_TEST_F(SignalTest, InvalidSignalQueryUnboundTest) {
- if (!context_)
- return;
-
// Signalling something that doesn't exist should run the callback
// immediately.
TestSignalQuery(928729087);
« no previous file with comments | « content/browser/gpu/gpu_ipc_browsertests.cc ('k') | content/common/gpu/client/gpu_in_process_context_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698