aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-09 09:01:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-09 16:32:10 +0000
commitf865b05fe50ca2c094b9c60e4405c6094415b4f6 (patch)
treea00eab7c3787b5b977b3ae7c15aa1732f5a42c97 /tests
parentad06544cc6ac4b403a24adda4ee36b9f35b3071f (diff)
Add GM configs that test rendering to a GL backend texture and render target
This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now. Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90 Reviewed-on: https://skia-review.googlesource.com/113305 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/TestConfigParsing.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 6ff1fd830f..fae8cd8a14 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -41,13 +41,15 @@ DEF_TEST(ParseConfigs_Gpu, reporter) {
REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0);
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType()
- == GrContextFactory::kGL_ContextType);
+ REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() ==
+ GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 1);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == nullptr);
+ REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSurfType() ==
+ SkCommandLineConfigGpu::SurfType::kDefault);
#endif
}
@@ -112,6 +114,7 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
"gl565",
"gltestthreading",
"gl1010102",
+ "glesbert"
});
SkCommandLineConfigArray configs;
@@ -204,6 +207,9 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getColorType() ==
kRGBA_1010102_SkColorType);
+ REPORTER_ASSERT(reporter, configs[38]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getSurfType() ==
+ SkCommandLineConfigGpu::SurfType::kBackendRenderTarget);
#endif
}
@@ -218,7 +224,7 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
"gpu[api=gl]",
"gpu[api=vulkan]",
"gpu[api=metal]",
- "gpu[api=mock]",
+ "gpu[api=mock,surf=betex]",
});
SkCommandLineConfigArray configs;
@@ -268,6 +274,8 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
#endif
REPORTER_ASSERT(reporter, configs[9]->asConfigGpu()->getContextType() ==
GrContextFactory::kMock_ContextType);
+ REPORTER_ASSERT(reporter, configs[9]->asConfigGpu()->getSurfType() ==
+ SkCommandLineConfigGpu::SurfType::kBackendTexture);
#endif
}