From 0d96175c97856d272d299c86577a34f825e810fc Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Fri, 17 Nov 2017 11:34:03 -0500 Subject: [PATCH] Do not return null paint if shaderFP is null This fixes the ripple bug reported by LG: https://b.corp.google.com/issues/68964656 In that bug, the button is so tall that our image shader returns a null fragment processor because the height exceeds GL_MAX_TEXTURE_SIZE. If we return null paint, the ripple is completely gone. This CL returns a default paint so we can still see the ripple, and that matches HWUI's behaviour. A GM will be added later after some other urgent Android ripple bug fixes. Bug: skia: Change-Id: I9bcafc078916a6a15fbd84d2019f39ac88d2b2f8 Reviewed-on: https://skia-review.googlesource.com/73200 Commit-Queue: Yuqian Li Reviewed-by: Brian Salomon --- src/gpu/SkGr.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 026a7482b4..7fba93e694 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -444,9 +444,6 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context, } else if (const auto* shader = as_SB(skPaint.getShader())) { shaderFP = shader->asFragmentProcessor(SkShaderBase::AsFPArgs( context, &viewM, nullptr, skPaint.getFilterQuality(), &colorSpaceInfo)); - if (!shaderFP) { - return false; - } } }