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

Unified Diff: tests/GrContextFactoryTest.cpp

Issue 1971613003: Make unit tests use generic testcontext rather than glcontext (Closed) Base URL: https://chromium.googlesource.com/skia.git@vknano
Patch Set: run deferredimage test on vk 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 | tests/ImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrContextFactoryTest.cpp
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index e710ca4867e9d479f5c95964d5b09ca5ccf7662d..3b12b832da7848ed94528929fde374ba95d11f78 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -78,9 +78,7 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) {
if (!info1.grContext()) {
continue;
}
- if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) {
- REPORTER_ASSERT(reporter, info1.glContext());
- }
+ REPORTER_ASSERT(reporter, info1.testContext());
// Ref for comparison. The API does not explicitly say that this stays alive.
info1.grContext()->ref();
testFactory.abandonContexts();
@@ -88,9 +86,8 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) {
// Test that we get different context after abandon.
ContextInfo info2 = testFactory.getContextInfo(ctxType);
REPORTER_ASSERT(reporter, info2.grContext());
- if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) {
- REPORTER_ASSERT(reporter, info2.glContext());
- }
+ REPORTER_ASSERT(reporter, info2.testContext());
+
REPORTER_ASSERT(reporter, info1.grContext() != info2.grContext());
// The GL context should also change, but it also could get the same address.
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698