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

Unified Diff: tests/GrContextFactoryTest.cpp

Issue 1872283003: Vulkan config in dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build Created 4 years, 8 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 | « src/gpu/vk/GrVkGpu.cpp ('k') | tests/Test.h » ('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 395fa6a37f24960953bc31db192735fd117795eb..fe4f1ef82f78824c12814ec756a9afcd46ea01bb 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -78,7 +78,9 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) {
if (!info1.fGrContext) {
continue;
}
- REPORTER_ASSERT(reporter, info1.fGLContext);
+ if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) {
+ REPORTER_ASSERT(reporter, info1.fGLContext);
+ }
// Ref for comparison. The API does not explicitly say that this stays alive.
info1.fGrContext->ref();
testFactory.abandonContexts();
@@ -86,7 +88,9 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) {
// Test that we get different context after abandon.
ContextInfo info2 = testFactory.getContextInfo(ctxType);
REPORTER_ASSERT(reporter, info2.fGrContext);
- REPORTER_ASSERT(reporter, info2.fGLContext);
+ if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) {
+ REPORTER_ASSERT(reporter, info2.fGLContext);
+ }
REPORTER_ASSERT(reporter, info1.fGrContext != info2.fGrContext);
// fGLContext should also change, but it also could get the same address.
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | tests/Test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698