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 <liyuqian@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Yuqian Li 2017-11-17 11:34:03 -05:00 committed by Skia Commit-Bot
parent 55ad774812
commit 0d96175c97

View File

@ -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;
}
}
}