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

Unified Diff: src/core/SkLocalMatrixShader.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/SkLocalMatrixShader.h ('k') | src/core/SkNormalSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLocalMatrixShader.cpp
diff --git a/src/core/SkLocalMatrixShader.cpp b/src/core/SkLocalMatrixShader.cpp
index cb85019827d62bb713962d6f32bcb8a5d2f9e4e4..4f74138b9c51b27cb95f8d5022cfd7c5752d8e7b 100644
--- a/src/core/SkLocalMatrixShader.cpp
+++ b/src/core/SkLocalMatrixShader.cpp
@@ -12,15 +12,13 @@
#endif
#if SK_SUPPORT_GPU
-sk_sp<GrFragmentProcessor> SkLocalMatrixShader::asFragmentProcessor(
- GrContext* context, const SkMatrix& viewM,
- const SkMatrix* localMatrix, SkFilterQuality fq,
- SkSourceGammaTreatment gammaTreatment) const {
+sk_sp<GrFragmentProcessor> SkLocalMatrixShader::asFragmentProcessor(const AsFPArgs& args) const {
SkMatrix tmp = this->getLocalMatrix();
- if (localMatrix) {
- tmp.preConcat(*localMatrix);
+ if (args.fLocalMatrix) {
+ tmp.preConcat(*args.fLocalMatrix);
}
- return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq, gammaTreatment);
+ return fProxyShader->asFragmentProcessor(AsFPArgs(
+ args.fContext, args.fViewMatrix, &tmp, args.fFilterQuality, args.fGammaTreatment));
}
#endif
« no previous file with comments | « src/core/SkLocalMatrixShader.h ('k') | src/core/SkNormalSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698