diff options
author | Yuqian Li <liyuqian@google.com> | 2018-02-26 10:34:52 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-26 15:56:07 +0000 |
commit | aad2ec69f32bad4eef0663600d606e4526488f16 (patch) | |
tree | a7f600513acc8ca4e0e944c27116ad169f131544 | |
parent | b68319a4b71a6be4655b00c49a4066df1aa429d4 (diff) |
Revert "Do not return null paint if shaderFP is null"
This reverts commit 0d96175c97856d272d299c86577a34f825e810fc.
Reason for revert: skia:7583
Also, LG probably doesn't really care about the original fix
so we should be fine for reverting the CL.
Original change's description:
> 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>
TBR=egdaniel@google.com,bsalomon@google.com,liyuqian@google.com
Bug: skia:7583
Change-Id: I0c8fe994bf0ae07d9f52eafee79adcfcbd0c6445
Reviewed-on: https://skia-review.googlesource.com/110200
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
-rw-r--r-- | src/gpu/SkGr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index c4bbf487f8..37e4c8f430 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -364,6 +364,9 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context, shaderFP = std::move(*shaderProcessor); } else if (const auto* shader = as_SB(skPaint.getShader())) { shaderFP = shader->asFragmentProcessor(fpArgs); + if (!shaderFP) { + return false; + } } } |