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

Unified Diff: tests/ImageIsOpaqueTest.cpp

Issue 2086583002: update callers to not use SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm flag instead of commenting it out 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/ColorSpaceTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageIsOpaqueTest.cpp
diff --git a/tests/ImageIsOpaqueTest.cpp b/tests/ImageIsOpaqueTest.cpp
index 51229bfce3b31a6d40775db96324e586ae5b2f62..42c9f99d38572eee8537988cbf942fc89d747a06 100644
--- a/tests/ImageIsOpaqueTest.cpp
+++ b/tests/ImageIsOpaqueTest.cpp
@@ -26,8 +26,7 @@ static void test_flatten(skiatest::Reporter* reporter, const SkImageInfo& info)
SkReadBuffer rb(storage, wb.bytesWritten());
// pick a noisy byte pattern, so we ensure that unflatten sets all of our fields
- SkImageInfo info2 = SkImageInfo::Make(0xB8, 0xB8, (SkColorType) 0xB8, (SkAlphaType) 0xB8,
- (SkColorProfileType) 0xB8);
+ SkImageInfo info2 = SkImageInfo::Make(0xB8, 0xB8, (SkColorType) 0xB8, (SkAlphaType) 0xB8);
info2.unflatten(rb);
REPORTER_ASSERT(reporter, rb.offset() == wb.bytesWritten());
@@ -38,13 +37,19 @@ static void test_flatten(skiatest::Reporter* reporter, const SkImageInfo& info)
}
DEF_TEST(ImageInfo_flattening, reporter) {
+ sk_sp<SkColorSpace> spaces[] = {
+ nullptr,
+ SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named),
+ SkColorSpace::NewNamed(SkColorSpace::kAdobeRGB_Named),
+ };
+
for (int ct = 0; ct <= kLastEnum_SkColorType; ++ct) {
for (int at = 0; at <= kLastEnum_SkAlphaType; ++at) {
- for (int pt = 0; pt <= kLastEnum_SkColorProfileType; ++pt) {
+ for (auto& cs : spaces) {
SkImageInfo info = SkImageInfo::Make(100, 200,
static_cast<SkColorType>(ct),
static_cast<SkAlphaType>(at),
- static_cast<SkColorProfileType>(pt));
+ cs);
test_flatten(reporter, info);
}
}
« no previous file with comments | « tests/ColorSpaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698