Chromium Code Reviews| Index: src/core/SkPictureShader.cpp |
| diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp |
| index 0b3c9e864bf9830b103e1839db7b4395ff1806ac..5aebbf6e04f0544c9c64446a9f8f4748bd381602 100644 |
| --- a/src/core/SkPictureShader.cpp |
| +++ b/src/core/SkPictureShader.cpp |
| @@ -336,27 +336,17 @@ void SkPictureShader::toString(SkString* str) const { |
| #endif |
| #if SK_SUPPORT_GPU |
| -bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& paint, |
| - const SkMatrix& viewM, const SkMatrix* localMatrix, |
| - GrColor* paintColor, |
| - GrProcessorDataManager* procDataManager, |
| - GrFragmentProcessor** fp) const { |
| +const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(GrContext* context, |
| + const SkMatrix& viewM, const SkMatrix* localMatrix, SkFilterQuality fq, |
| + GrProcessorDataManager* procDataManager) const { |
| int maxTextureSize = 0; |
| if (context) { |
| maxTextureSize = context->caps()->maxTextureSize(); |
| } |
| SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix, maxTextureSize)); |
| if (!bitmapShader) { |
| - return false; |
| + return nullptr; |
| } |
| - return bitmapShader->asFragmentProcessor(context, paint, viewM, nullptr, paintColor, |
| - procDataManager, fp); |
| -} |
| -#else |
| -bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&, |
| - const SkMatrix*, GrColor*, GrProcessorDataManager*, |
| - GrFragmentProcessor**) const { |
| - SkDEBUGFAIL("Should not call in GPU-less build"); |
| - return false; |
| + return bitmapShader->asFragmentProcessor(context, viewM, NULL, fq, procDataManager); |
|
wangyix
2015/08/28 15:02:13
NULL is passed to asFragmentProcessor() everywhere
bsalomon
2015/08/28 15:08:27
Done.
|
| } |
| #endif |