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

Unified Diff: src/gpu/effects/GrBicubicEffect.cpp

Issue 2180803005: Add color gamut xform helpers to GrGLSLShaderBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@xform-storage
Patch Set: Rebase Created 4 years, 3 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
Index: src/gpu/effects/GrBicubicEffect.cpp
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 8439909f56e0a7a1c0f048986a8fbcdd34c1ff28..69fe9064718dad37a67b23a39266a1de5412c8dd 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -30,7 +30,7 @@ public:
GrProcessorKeyBuilder* b) {
const GrBicubicEffect& bicubicEffect = effect.cast<GrBicubicEffect>();
b->add32(GrTextureDomain::GLDomain::DomainKey(bicubicEffect.domain()));
- b->add32(SkToInt(SkToBool(bicubicEffect.colorSpaceXform())));
+ b->add32(GrColorSpaceXform::XformKey(bicubicEffect.colorSpaceXform()));
}
protected:
@@ -114,7 +114,9 @@ void GrGLBicubicEffect::emitCode(EmitArgs& args) {
SkString bicubicColor;
bicubicColor.printf("%s(%s, f.y, s0, s1, s2, s3)", cubicBlendName.c_str(), coeff);
if (colorSpaceHelper.getXformMatrix()) {
- bicubicColor.appendf(" * %s", colorSpaceHelper.getXformMatrix());
+ SkString xformedColor;
+ fragBuilder->appendColorGamutXform(&xformedColor, bicubicColor.c_str(), &colorSpaceHelper);
+ bicubicColor.swap(xformedColor);
}
fragBuilder->codeAppendf("\t%s = %s;\n",
args.fOutputColor, (GrGLSLExpr4(bicubicColor.c_str()) *

Powered by Google App Engine
This is Rietveld 408576698