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

Unified Diff: tests/TestConfigParsing.cpp

Issue 2069173002: Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bad assert Created 4 years, 6 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 | « tests/ReadPixelsTest.cpp ('k') | tools/flags/SkCommonFlagsConfig.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TestConfigParsing.cpp
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 4d64cafb161f5a1b7fa5d0970f5a4d8186e00249..63bf120f022f986f7ce1332cd139f317b3cf674d 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -46,8 +46,7 @@ DEF_TEST(ParseConfigs_Gpu, reporter) {
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kN32_SkColorType);
- REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getProfileType()
- == kLinear_SkColorProfileType);
+ REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == nullptr);
#endif
}
@@ -83,6 +82,8 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
+ auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
+
REPORTER_ASSERT(reporter, configs.count() == config1.count());
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
@@ -118,14 +119,11 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType()
- == kRGBA_F16_SkColorType);
- REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getProfileType()
- == kLinear_SkColorProfileType);
- REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType()
- == kN32_SkColorType);
- REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getProfileType()
- == kSRGB_SkColorProfileType);
+ REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
+ REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace() == nullptr);
+ REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kN32_SkColorType);
+ REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
+
#if SK_ANGLE
#ifdef SK_BUILD_FOR_WIN
REPORTER_ASSERT(reporter, configs[20]->asConfigGpu());
@@ -157,8 +155,7 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[30]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorType() == kN32_SkColorType);
- REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getProfileType() ==
- kSRGB_SkColorProfileType);
+ REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
REPORTER_ASSERT(reporter, configs[31]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getSamples() == 4);
#ifdef SK_VULKAN
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tools/flags/SkCommonFlagsConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698