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

Unified Diff: tools/visualize_color_gamut.cpp

Issue 2389983002: Refactored SkColorSpace and added in a Lab PCS GM (Closed)
Patch Set: migrated call from SkColorSpace_Base::makeLinearGamma() to SkColorSpace_XYZ::makeLinearGamma() 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 | « tools/flags/SkCommonFlagsConfig.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/visualize_color_gamut.cpp
diff --git a/tools/visualize_color_gamut.cpp b/tools/visualize_color_gamut.cpp
index b45996bc8dc4a75827f3e45463c35d4316bf09c8..6d08ba213b5ec3062d490906d8102146c5ba2ebf 100644
--- a/tools/visualize_color_gamut.cpp
+++ b/tools/visualize_color_gamut.cpp
@@ -141,13 +141,17 @@ int main(int argc, char** argv) {
// Draw the sRGB gamut if requested.
if (FLAGS_sRGB) {
sk_sp<SkColorSpace> sRGBSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
- draw_gamut(&canvas, as_CSB(sRGBSpace)->toXYZD50(), "sRGB", 0xFFFF9394, false);
+ const SkMatrix44* mat = as_CSB(sRGBSpace)->toXYZD50();
+ SkASSERT(mat);
+ draw_gamut(&canvas, *mat, "sRGB", 0xFFFF9394, false);
}
// Draw the Adobe RGB gamut if requested.
if (FLAGS_adobeRGB) {
sk_sp<SkColorSpace> adobeRGBSpace = SkColorSpace::NewNamed(SkColorSpace::kAdobeRGB_Named);
- draw_gamut(&canvas, as_CSB(adobeRGBSpace)->toXYZD50(), "Adobe RGB", 0xFF31a9e1, false);
+ const SkMatrix44* mat = as_CSB(adobeRGBSpace)->toXYZD50();
+ SkASSERT(mat);
+ draw_gamut(&canvas, *mat, "Adobe RGB", 0xFF31a9e1, false);
}
// Draw gamut for the input image.
@@ -156,7 +160,9 @@ int main(int argc, char** argv) {
SkDebugf("Image had no embedded color space information. Defaulting to sRGB.\n");
colorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
}
- draw_gamut(&canvas, as_CSB(colorSpace)->toXYZD50(), input, 0xFF000000, true);
+ const SkMatrix44* mat = as_CSB(colorSpace)->toXYZD50();
+ SkASSERT(mat);
+ draw_gamut(&canvas, *mat, input, 0xFF000000, true);
// Finally, encode the result to the output file.
sk_sp<SkData> out(SkImageEncoder::EncodeData(gamut, SkImageEncoder::kPNG_Type, 100));
« no previous file with comments | « tools/flags/SkCommonFlagsConfig.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698