diff options
author | Florin Malita <fmalita@chromium.org> | 2018-04-04 13:46:35 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-04 18:13:48 +0000 |
commit | af2769d00b70ca456452e4e88bdf5abecd320f68 (patch) | |
tree | 83fef5b2e2a4d66ec9de911cfc33fdc2d5ffe6dd /src/shaders/SkPictureShader.h | |
parent | bf74a460814a7912ed3d2e1af000afd2c45cd318 (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/SkPictureShader.h')
-rw-r--r-- | src/shaders/SkPictureShader.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/shaders/SkPictureShader.h b/src/shaders/SkPictureShader.h index 3b7cab0f2d..6ad7165899 100644 --- a/src/shaders/SkPictureShader.h +++ b/src/shaders/SkPictureShader.h @@ -41,7 +41,6 @@ protected: bool onAppendStages(const StageRec&) const override; Context* onMakeContext(const ContextRec&, SkArenaAlloc*) const override; sk_sp<SkShader> onMakeColorSpace(SkColorSpaceXformer* xformer) const override; - bool onIsRasterPipelineOnly(const SkMatrix&) const override; private: SkPictureShader(sk_sp<SkPicture>, TileMode, TileMode, const SkMatrix*, const SkRect*, |