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

Unified Diff: src/core/SkImageInfo.cpp

Issue 2035813003: add MakeS32 helper to SkImageInfo, fix named-gamma constructor bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 4 years, 7 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/core/SkColorSpace.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageInfo.cpp
diff --git a/src/core/SkImageInfo.cpp b/src/core/SkImageInfo.cpp
index 81a68f3de3715f0400e1862e133df68d4cb7016c..7a2558ebd3f992ea0c34a1523cc2eeb33cf37231 100644
--- a/src/core/SkImageInfo.cpp
+++ b/src/core/SkImageInfo.cpp
@@ -35,6 +35,11 @@ SkImageInfo SkImageInfo::Make(int width, int height, SkColorType ct, SkAlphaType
return SkImageInfo(width, height, ct, at, SkDefaultColorProfile(), std::move(cs));
}
+SkImageInfo SkImageInfo::MakeS32(int width, int height, SkAlphaType at) {
+ return SkImageInfo(width, height, kN32_SkColorType, at, kSRGB_SkColorProfileType,
+ SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named));
+}
+
void SkImageInfo::unflatten(SkReadBuffer& buffer) {
fWidth = buffer.read32();
fHeight = buffer.read32();
« no previous file with comments | « src/core/SkColorSpace.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698