diff options
Diffstat (limited to 'src/core/SkPictureShader.cpp')
-rw-r--r-- | src/core/SkPictureShader.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp index 0b3c9e864b..f3ac638025 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, nullptr, fq, procDataManager); } #endif |