Index: src/core/SkPictureShader.cpp |
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp |
index a6186e6c7db57d81813effbc250d3e586d860b1b..1b1189c20d92fdd42e5dc867530da41fa3541f17 100644 |
--- a/src/core/SkPictureShader.cpp |
+++ b/src/core/SkPictureShader.cpp |
@@ -318,19 +318,17 @@ void SkPictureShader::toString(SkString* str) const { |
#endif |
#if SK_SUPPORT_GPU |
-sk_sp<GrFragmentProcessor> SkPictureShader::asFragmentProcessor( |
- GrContext* context, const SkMatrix& viewM, |
- const SkMatrix* localMatrix, |
- SkFilterQuality fq, |
- SkSourceGammaTreatment gammaTreatment) const { |
+sk_sp<GrFragmentProcessor> SkPictureShader::asFragmentProcessor(const AsFPArgs& args) const { |
int maxTextureSize = 0; |
- if (context) { |
- maxTextureSize = context->caps()->maxTextureSize(); |
+ if (args.fContext) { |
+ maxTextureSize = args.fContext->caps()->maxTextureSize(); |
} |
- sk_sp<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix, maxTextureSize)); |
+ sk_sp<SkShader> bitmapShader(this->refBitmapShader(*args.fViewMatrix, args.fLocalMatrix, |
+ maxTextureSize)); |
if (!bitmapShader) { |
return nullptr; |
} |
- return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, gammaTreatment); |
+ return bitmapShader->asFragmentProcessor(SkShader::AsFPArgs( |
+ args.fContext, args.fViewMatrix, nullptr, args.fFilterQuality, args.fGammaTreatment)); |
} |
#endif |