diff options
author | Brian Salomon <bsalomon@google.com> | 2017-06-09 16:11:32 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-09 20:33:51 +0000 |
commit | 06e547cb5f43dcc829f7f6a2ca773cfd602b32da (patch) | |
tree | e60c9b9483efd02c9c74fa0c12111cfa2d53e512 /src/shaders/gradients/SkGradientShaderPriv.h | |
parent | f066ac908eca30af2bb2fb241fb0eec78caa88db (diff) |
Fix GrGradientEffect::isValid()
This was relying on TextureSampler::proxy() which crashes if the proxy is not valid.
Bug: skia:
Change-Id: I8452f5cea3a71b5ced15259aede52a44ab152cf2
Reviewed-on: https://skia-review.googlesource.com/19403
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/shaders/gradients/SkGradientShaderPriv.h')
-rw-r--r-- | src/shaders/gradients/SkGradientShaderPriv.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shaders/gradients/SkGradientShaderPriv.h b/src/shaders/gradients/SkGradientShaderPriv.h index 5e55316ed1..3322982708 100644 --- a/src/shaders/gradients/SkGradientShaderPriv.h +++ b/src/shaders/gradients/SkGradientShaderPriv.h @@ -442,7 +442,9 @@ protected: const GrCoordTransform& getCoordTransform() const { return fCoordTransform; } /** Checks whether the constructor failed to fully initialize the processor. */ - bool isValid() const { return fColorType != kTexture_ColorType || fTextureSampler.proxy(); } + bool isValid() const { + return fColorType != kTexture_ColorType || fTextureSampler.isInitialized(); + } private: static OptimizationFlags OptFlags(bool isOpaque); |