diff options
author | Florin Malita <fmalita@chromium.org> | 2017-05-15 15:06:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-16 02:01:03 +0000 |
commit | 7d022e099ba586804bd326fcb45c1a2d805d7c7d (patch) | |
tree | 684c0f71157dc349255907f56ceeb4c52c3ca164 /include/core/SkShader.h | |
parent | a5da966a863b75f944cf153a6507555bf1b45aaf (diff) |
Always use raster pipeline for SkSweepGradient
Add an opt-in mechanism (SkShader::isRasterPipelineOnly) and switch
SkSweepGradient to always-RP.
This also repurposes the existing SK_LEGACY_SWEEP_GRADIENT guard.
Change-Id: Iabf0a701eda56f009d331120f0c987f96bd35d27
Reviewed-on: https://skia-review.googlesource.com/16912
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'include/core/SkShader.h')
-rw-r--r-- | include/core/SkShader.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h index b253b6b852..260306cfd4 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -506,6 +506,8 @@ protected: return sk_ref_sp(const_cast<SkShader*>(this)); } + virtual bool isRasterPipelineOnly() const { return false; } + private: virtual bool onAppendStages(SkRasterPipeline*, SkColorSpace* dstCS, SkArenaAlloc*, const SkMatrix&, const SkPaint&, const SkMatrix* localM) const; @@ -516,6 +518,8 @@ private: friend class SkLocalMatrixShader; // sets fLocalMatrix in SkReadBuffer constructor friend class SkBitmapProcLegacyShader; // calls computeTotalInverse() friend class SkColorSpaceXformer; // calls makeColorSpace() + friend class SkBlitter; // calls isRasterPipelineOnly() + friend class SkComposeShader; // calls isRasterPipelineOnly() typedef SkFlattenable INHERITED; }; |