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

Unified Diff: src/core/SkComposeShader.cpp

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation 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 | « src/core/SkComposeShader.h ('k') | src/core/SkImageCacherator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkComposeShader.cpp
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 46b7724944676a297b5745b4f658ec40dd34ca5c..13569f1b48d9d0d44c04b726e606fa4736c352aa 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -183,10 +183,12 @@ void SkComposeShader::ComposeShaderContext::shadeSpan(int x, int y, SkPMColor re
/////////////////////////////////////////////////////////////////////
-const GrFragmentProcessor* SkComposeShader::asFragmentProcessor(GrContext* context,
- const SkMatrix& viewM,
- const SkMatrix* localMatrix,
- SkFilterQuality fq) const {
+const GrFragmentProcessor* SkComposeShader::asFragmentProcessor(
+ GrContext* context,
+ const SkMatrix& viewM,
+ const SkMatrix* localMatrix,
+ SkFilterQuality fq,
+ SkSourceGammaTreatment gammaTreatment) const {
// Fragment processor will only support SkXfermode::Mode modes currently.
SkXfermode::Mode mode;
if (!(SkXfermode::AsMode(fMode, &mode))) {
@@ -199,19 +201,19 @@ const GrFragmentProcessor* SkComposeShader::asFragmentProcessor(GrContext* conte
GrConstColorProcessor::kIgnore_InputMode);
break;
case SkXfermode::kSrc_Mode:
- return fShaderB->asFragmentProcessor(context, viewM, localMatrix, fq);
+ return fShaderB->asFragmentProcessor(context, viewM, localMatrix, fq, gammaTreatment);
break;
case SkXfermode::kDst_Mode:
- return fShaderA->asFragmentProcessor(context, viewM, localMatrix, fq);
+ return fShaderA->asFragmentProcessor(context, viewM, localMatrix, fq, gammaTreatment);
break;
default:
SkAutoTUnref<const GrFragmentProcessor> fpA(fShaderA->asFragmentProcessor(context,
- viewM, localMatrix, fq));
+ viewM, localMatrix, fq, gammaTreatment));
if (!fpA.get()) {
return nullptr;
}
SkAutoTUnref<const GrFragmentProcessor> fpB(fShaderB->asFragmentProcessor(context,
- viewM, localMatrix, fq));
+ viewM, localMatrix, fq, gammaTreatment));
if (!fpB.get()) {
return nullptr;
}
« no previous file with comments | « src/core/SkComposeShader.h ('k') | src/core/SkImageCacherator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698