diff options
author | Brian Salomon <bsalomon@google.com> | 2017-03-20 08:54:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-20 13:31:49 +0000 |
commit | 6405e71279e99731f89db69325c6763ec62a98e1 (patch) | |
tree | f1ce7b3cc37ec3e9f9f4f135655376fd30174753 /tests/ImageTest.cpp | |
parent | 5e21e0991968271ee37f446de7e08620ad1b50bb (diff) |
Remove gpu configs that don't have explicit API.
DOCS_PREVIEW= https://skia.org/?cl=9871
Change-Id: I510473cf91d8bee38d1e33424b1ae7b30dc86968
Reviewed-on: https://skia-review.googlesource.com/9871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/ImageTest.cpp')
-rw-r--r-- | tests/ImageTest.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index e0e64ead10..55f200a3d0 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -466,13 +466,26 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(c, reporter, ctxInfo) { } } +GrContextFactory::ContextType pick_second_context_type(const sk_gpu_test::ContextInfo& info) { + switch (info.backend()) { + case kOpenGL_GrBackend: + if (info.glContext()->gl()->fStandard == kGLES_GrGLStandard) { + return GrContextFactory::kGLES_ContextType; + } else { + return GrContextFactory::kGL_ContextType; + } + case kVulkan_GrBackend: + return GrContextFactory::kVulkan_ContextType; + } + SkFAIL("Unknown backend type."); + return GrContextFactory::kGL_ContextType; +} + DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkImage_makeTextureImage, reporter, contextInfo) { GrContext* context = contextInfo.grContext(); sk_gpu_test::TestContext* testContext = contextInfo.testContext(); - GrContextFactory otherFactory; - GrContextFactory::ContextType otherContextType = - GrContextFactory::NativeContextTypeForBackend(testContext->backend()); + GrContextFactory::ContextType otherContextType = pick_second_context_type(contextInfo); ContextInfo otherContextInfo = otherFactory.getContextInfo(otherContextType); testContext->makeCurrent(); @@ -932,7 +945,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredTextureImage, reporter, ctxInfo) { GrContextFactory otherFactory; ContextInfo otherContextInfo = - otherFactory.getContextInfo(GrContextFactory::kNativeGL_ContextType); + otherFactory.getContextInfo(pick_second_context_type(ctxInfo)); testContext->makeCurrent(); REPORTER_ASSERT(reporter, proxy); |