aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders/gradients/SkGradientShaderPriv.h
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-04-04 13:46:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-04 18:13:48 +0000
commitaf2769d00b70ca456452e4e88bdf5abecd320f68 (patch)
tree83fef5b2e2a4d66ec9de911cfc33fdc2d5ffe6dd /src/shaders/gradients/SkGradientShaderPriv.h
parentbf74a460814a7912ed3d2e1af000afd2c45cd318 (diff)
Banish SkShaderBase::isRasterPipelineOnly()
Keeping related heuristics in sync with actual shader capabilities is somewhat tricky, and overall fragile. So how about this: instead of an explicit opt-in mechanism, try to instantiate a legacy shader context and fall back to raster pipeline on failure (null Context => implicit opt-in for raster pipeline). Shaders can still choose not to draw by returning both a null Context and failing appendStages(). BUG=skia:7772 Change-Id: I2e76f51af7064853a6cb851b4c30c82eba3ee828 Reviewed-on: https://skia-review.googlesource.com/118383 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'src/shaders/gradients/SkGradientShaderPriv.h')
-rw-r--r--src/shaders/gradients/SkGradientShaderPriv.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/shaders/gradients/SkGradientShaderPriv.h b/src/shaders/gradients/SkGradientShaderPriv.h
index 7fef12758a..29c8c6eb20 100644
--- a/src/shaders/gradients/SkGradientShaderPriv.h
+++ b/src/shaders/gradients/SkGradientShaderPriv.h
@@ -94,7 +94,6 @@ protected:
void initLinearBitmap(SkBitmap* bitmap, GradientBitmapType) const;
bool onAppendStages(const StageRec&) const override;
- bool onIsRasterPipelineOnly(const SkMatrix& ctm) const override;
virtual void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline,
SkRasterPipeline* postPipeline) const = 0;