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

Unified Diff: tests/ColorSpaceTest.cpp

Issue 2193223002: Hide (mostly) unused SkColorSpace writeToICC() function (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Continue testing Created 4 years, 5 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/pdf/SkPDFDocument.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ColorSpaceTest.cpp
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp
index 8837c380371a2b4a50f878bb77c2a70c39c3f18e..66860da590d12dd4838ce0a714514b3cb18f8d50 100644
--- a/tests/ColorSpaceTest.cpp
+++ b/tests/ColorSpaceTest.cpp
@@ -113,10 +113,17 @@ DEF_TEST(ColorSpaceSRGBCompare, r) {
REPORTER_ASSERT(r, strangeColorSpace != namedColorSpace);
}
+class ColorSpaceTest {
+public:
+ static sk_sp<SkData> WriteToICC(SkColorSpace* space) {
+ return as_CSB(space)->writeToICC();
+ }
+};
+
DEF_TEST(ColorSpaceWriteICC, r) {
// Test writing a new ICC profile
sk_sp<SkColorSpace> namedColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
- sk_sp<SkData> namedData = as_CSB(namedColorSpace)->writeToICC();
+ sk_sp<SkData> namedData = ColorSpaceTest::WriteToICC(namedColorSpace.get());
sk_sp<SkColorSpace> iccColorSpace = SkColorSpace::NewICC(namedData->data(), namedData->size());
test_space(r, iccColorSpace.get(), g_sRGB_XYZ, &g_sRGB_XYZ[3], &g_sRGB_XYZ[6],
SkColorSpace::k2Dot2Curve_GammaNamed);
@@ -132,7 +139,7 @@ DEF_TEST(ColorSpaceWriteICC, r) {
}
sk_sp<SkColorSpace> monitorSpace = SkColorSpace::NewICC(monitorData->data(),
monitorData->size());
- sk_sp<SkData> newMonitorData = as_CSB(monitorSpace)->writeToICC();
+ sk_sp<SkData> newMonitorData = ColorSpaceTest::WriteToICC(monitorSpace.get());
sk_sp<SkColorSpace> newMonitorSpace = SkColorSpace::NewICC(newMonitorData->data(),
newMonitorData->size());
REPORTER_ASSERT(r, monitorSpace->xyz() == newMonitorSpace->xyz());
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698