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

Unified Diff: src/gpu/GrTextureParamsAdjuster.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/GrTextureParamsAdjuster.cpp
diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp
index 3ca90f5adb0a6e433743f9f2d9b406adb0021487..1586d73297ce7bfc2a74c7ad0091f9175bca2133 100644
--- a/src/gpu/GrTextureParamsAdjuster.cpp
+++ b/src/gpu/GrTextureParamsAdjuster.cpp
@@ -424,7 +424,8 @@ sk_sp<GrFragmentProcessor> GrTextureAdjuster::createFragmentProcessor(
(domain.fLeft <= domain.fRight && domain.fTop <= domain.fBottom));
textureMatrix.postIDiv(texture->width(), texture->height());
sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(this->getColorSpace(),
- dstColorSpace);
+ dstColorSpace,
+ this->alphaType());
return create_fp_for_domain_and_filter(texture, std::move(colorSpaceXform), textureMatrix,
domainMode, domain, filterOrNullForBicubic);
}
@@ -506,7 +507,8 @@ sk_sp<GrFragmentProcessor> GrTextureMaker::createFragmentProcessor(
SkMatrix normalizedTextureMatrix = textureMatrix;
normalizedTextureMatrix.postIDiv(texture->width(), texture->height());
sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(this->getColorSpace(),
- dstColorSpace);
+ dstColorSpace,
+ this->alphaType());
return create_fp_for_domain_and_filter(texture, std::move(colorSpaceXform),
normalizedTextureMatrix, domainMode, domain,
filterOrNullForBicubic);

Powered by Google App Engine
This is Rietveld 408576698