aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrProcessor.h1
-rw-r--r--src/shaders/gradients/SkGradientShaderPriv.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrProcessor.h b/src/gpu/GrProcessor.h
index 7a12b6c196..f186af5591 100644
--- a/src/gpu/GrProcessor.h
+++ b/src/gpu/GrProcessor.h
@@ -255,6 +255,7 @@ public:
GrShaderFlags visibility() const { return fVisibility; }
const GrSamplerParams& params() const { return fParams; }
+ bool isInitialized() const { return SkToBool(fProxyRef.get()); }
/**
* For internal use by GrProcessor.
*/
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);