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

Unified Diff: src/core/SkComposeShader.cpp

Issue 2175563003: Bundle SkShader::asFragmentProcessor arguments in a struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indentation to be less arbitrary Created 4 years, 5 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/SkLightingShader.cpp » ('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 e9f3f4c6180f5f6ac6547fd9c2c4d7eae0350c69..7696e1632e73a0a656d54f13871d1809e6b918e9 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -183,12 +183,7 @@ void SkComposeShader::ComposeShaderContext::shadeSpan(int x, int y, SkPMColor re
/////////////////////////////////////////////////////////////////////
-sk_sp<GrFragmentProcessor> SkComposeShader::asFragmentProcessor(
- GrContext* context,
- const SkMatrix& viewM,
- const SkMatrix* localMatrix,
- SkFilterQuality fq,
- SkSourceGammaTreatment gammaTreatment) const {
+sk_sp<GrFragmentProcessor> SkComposeShader::asFragmentProcessor(const AsFPArgs& args) const {
// Fragment processor will only support SkXfermode::Mode modes currently.
SkXfermode::Mode mode;
if (!(SkXfermode::AsMode(fMode, &mode))) {
@@ -201,19 +196,17 @@ sk_sp<GrFragmentProcessor> SkComposeShader::asFragmentProcessor(
GrConstColorProcessor::kIgnore_InputMode);
break;
case SkXfermode::kSrc_Mode:
- return fShaderB->asFragmentProcessor(context, viewM, localMatrix, fq, gammaTreatment);
+ return fShaderB->asFragmentProcessor(args);
break;
case SkXfermode::kDst_Mode:
- return fShaderA->asFragmentProcessor(context, viewM, localMatrix, fq, gammaTreatment);
+ return fShaderA->asFragmentProcessor(args);
break;
default:
- sk_sp<GrFragmentProcessor> fpA(fShaderA->asFragmentProcessor(context,
- viewM, localMatrix, fq, gammaTreatment));
+ sk_sp<GrFragmentProcessor> fpA(fShaderA->asFragmentProcessor(args));
if (!fpA) {
return nullptr;
}
- sk_sp<GrFragmentProcessor> fpB(fShaderB->asFragmentProcessor(context,
- viewM, localMatrix, fq, gammaTreatment));
+ sk_sp<GrFragmentProcessor> fpB(fShaderB->asFragmentProcessor(args));
if (!fpB) {
return nullptr;
}
« no previous file with comments | « src/core/SkComposeShader.h ('k') | src/core/SkLightingShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698