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

Unified Diff: gm/color4f.cpp

Issue 2067833003: Differentiate between sRGBGamma and 2Dot2Gamma (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DefaultXform 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 | « no previous file | include/core/SkColorSpace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/color4f.cpp
diff --git a/gm/color4f.cpp b/gm/color4f.cpp
index ffe9a8742d01f73e8210f93a63347e55ee0bdce0..33d837786a2e2d42c95c714b5e882fe0d73cca8e 100644
--- a/gm/color4f.cpp
+++ b/gm/color4f.cpp
@@ -95,8 +95,6 @@ DEF_SIMPLE_GM(color4shader, canvas, 1024, 260) {
// red -> blue, green -> red, blue -> green
mat.set3x3(0, 1, 0, 0, 0, 1, 1, 0, 0);
- float linearGamma[3] = { 1.0f, 1.0f, 1.0f };
-
const SkColor4f colors[] {
{ 1, 1, 0, 0 },
{ 1, 0, 1, 0 },
@@ -111,7 +109,8 @@ DEF_SIMPLE_GM(color4shader, canvas, 1024, 260) {
sk_sp<SkShader> shaders[] {
SkShader::MakeColorShader(c4, nullptr),
SkShader::MakeColorShader(c4, SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named)),
- SkShader::MakeColorShader(c4, SkColorSpace::NewRGB(linearGamma, mat)),
+ SkShader::MakeColorShader(c4, SkColorSpace::NewRGB(SkColorSpace::kLinear_GammaNamed,
+ mat)),
};
canvas->save();
« no previous file with comments | « no previous file | include/core/SkColorSpace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698