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

Unified Diff: gm/gamma.cpp

Issue 2074103004: Revert of More removal of SkColorProfileType... (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gm/dftext.cpp ('k') | gm/surface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gamma.cpp
diff --git a/gm/gamma.cpp b/gm/gamma.cpp
index eb4c7607feb1e4b9d9d3a2a488595dd9c215e84c..c9fa28be104f87e1cf72c4710b03296893440101 100644
--- a/gm/gamma.cpp
+++ b/gm/gamma.cpp
@@ -18,7 +18,6 @@
const SkScalar tx = sz + 5.0f;
const SkRect r = SkRect::MakeXYWH(0, 0, sz, sz);
SkShader::TileMode rpt = SkShader::kRepeat_TileMode;
- auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
SkBitmap ditherBmp;
ditherBmp.allocN32Pixels(2, 2);
@@ -27,20 +26,21 @@
pixels[1] = pixels[2] = SkPackARGB32(0xFF, 0, 0, 0);
SkBitmap linearGreyBmp;
- SkImageInfo linearGreyInfo = SkImageInfo::MakeN32(szInt, szInt, kOpaque_SkAlphaType, nullptr);
+ SkImageInfo linearGreyInfo = SkImageInfo::MakeN32(szInt, szInt, kOpaque_SkAlphaType,
+ kLinear_SkColorProfileType);
linearGreyBmp.allocPixels(linearGreyInfo);
linearGreyBmp.eraseARGB(0xFF, 0x7F, 0x7F, 0x7F);
SkBitmap srgbGreyBmp;
SkImageInfo srgbGreyInfo = SkImageInfo::MakeN32(szInt, szInt, kOpaque_SkAlphaType,
- srgbColorSpace);
+ kSRGB_SkColorProfileType);
srgbGreyBmp.allocPixels(srgbGreyInfo);
// 0xBC = 255 * linear_to_srgb(0.5f)
srgbGreyBmp.eraseARGB(0xFF, 0xBC, 0xBC, 0xBC);
SkBitmap mipmapBmp;
SkImageInfo mipmapInfo = SkImageInfo::Make(2, 2, kN32_SkColorType, kOpaque_SkAlphaType,
- srgbColorSpace);
+ SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named));
mipmapBmp.allocPixels(mipmapInfo);
SkPMColor* mipmapPixels = reinterpret_cast<SkPMColor*>(mipmapBmp.getPixels());
unsigned s25 = 0x89; // 255 * linear_to_srgb(0.25f)
« no previous file with comments | « gm/dftext.cpp ('k') | gm/surface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698