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

Unified Diff: src/core/SkColorSpace.cpp

Issue 2408133009: Add NewRGB() with float gamma to SkColorSpace public API
Patch Set: Created 4 years, 2 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/codec/SkPngCodec.cpp ('k') | src/core/SkColorSpace_Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpace.cpp
diff --git a/src/core/SkColorSpace.cpp b/src/core/SkColorSpace.cpp
index 405285636ba4086368a74165b252dc0db68a8e45..bdef5b3b7547d601e1233eb68c5418344962410c 100644
--- a/src/core/SkColorSpace.cpp
+++ b/src/core/SkColorSpace.cpp
@@ -138,7 +138,7 @@ static bool xyz_almost_equal(const SkMatrix44& toXYZD50, const float* standard)
color_space_almost_equal(toXYZD50.getFloat(3, 3), 1.0f);
}
-sk_sp<SkColorSpace> SkColorSpace_Base::NewRGB(const float values[3], const SkMatrix44& toXYZD50) {
+sk_sp<SkColorSpace> SkColorSpace::NewRGB(const float values[3], const SkMatrix44& toXYZD50) {
if (0.0f > values[0] || 0.0f > values[1] || 0.0f > values[2]) {
return nullptr;
}
@@ -560,7 +560,7 @@ sk_sp<SkColorSpace> SkColorSpace::Deserialize(const void* data, size_t length) {
SkMatrix44 toXYZ(SkMatrix44::kUninitialized_Constructor);
toXYZ.set3x4RowMajorf((const float*) data);
- return SkColorSpace_Base::NewRGB(gammas, toXYZ);
+ return SkColorSpace::NewRGB(gammas, toXYZ);
}
case ColorSpaceHeader::kTransferFn_Flag: {
if (length < 19 * sizeof(float)) {
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/core/SkColorSpace_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698