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

Unified Diff: src/core/SkNormalSource.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/SkNormalSource.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkNormalSource.cpp
diff --git a/src/core/SkNormalSource.cpp b/src/core/SkNormalSource.cpp
index c082d843c1185c820914122aa2b75d1e28e0e35b..c282a124e0dd8144d16feeb77788fec428c9c36f 100644
--- a/src/core/SkNormalSource.cpp
+++ b/src/core/SkNormalSource.cpp
@@ -26,11 +26,7 @@ public:
, fInvCTM(invCTM) {}
#if SK_SUPPORT_GPU
- sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
- const SkMatrix& viewM,
- const SkMatrix* localMatrix,
- SkFilterQuality,
- SkSourceGammaTreatment) const override;
+ sk_sp<GrFragmentProcessor> asFragmentProcessor(const SkShader::AsFPArgs&) const override;
#endif
SkNormalSource::Provider* asProvider(const SkShader::ContextRec& rec,
@@ -178,13 +174,8 @@ private:
};
sk_sp<GrFragmentProcessor> NormalMapSourceImpl::asFragmentProcessor(
- GrContext *context,
- const SkMatrix &viewM,
- const SkMatrix *localMatrix,
- SkFilterQuality filterQuality,
- SkSourceGammaTreatment gammaTreatment) const {
- sk_sp<GrFragmentProcessor> mapFP = fMapShader->asFragmentProcessor(context, viewM,
- localMatrix, filterQuality, gammaTreatment);
+ const SkShader::AsFPArgs& args) const {
+ sk_sp<GrFragmentProcessor> mapFP = fMapShader->asFragmentProcessor(args);
if (!mapFP) {
return nullptr;
}
@@ -336,11 +327,7 @@ public:
NormalFlatSourceImpl(){}
#if SK_SUPPORT_GPU
- sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
- const SkMatrix& viewM,
- const SkMatrix* localMatrix,
- SkFilterQuality,
- SkSourceGammaTreatment) const override;
+ sk_sp<GrFragmentProcessor> asFragmentProcessor(const SkShader::AsFPArgs&) const override;
#endif
SkNormalSource::Provider* asProvider(const SkShader::ContextRec& rec,
@@ -418,11 +405,7 @@ private:
};
sk_sp<GrFragmentProcessor> NormalFlatSourceImpl::asFragmentProcessor(
- GrContext *context,
- const SkMatrix &viewM,
- const SkMatrix *localMatrix,
- SkFilterQuality filterQuality,
- SkSourceGammaTreatment gammaTreatment) const {
+ const SkShader::AsFPArgs&) const {
return sk_make_sp<NormalFlatFP>();
}
« no previous file with comments | « src/core/SkNormalSource.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698