diff options
author | Mike Klein <mtklein@chromium.org> | 2017-05-10 12:29:38 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-10 20:07:37 +0000 |
commit | 44d3279b4154725c8fbcf3650e2c85b116084ad9 (patch) | |
tree | 198869c3b6e8e411fc97590b6920b8b8da3a3e8c /include/core/SkShader.h | |
parent | 5ac13c23628c6ee8c3f6056f38527706b403e502 (diff) |
Make SkCreateRasterPipelineBlitter() not fail.
Mostly this is about extending the fallback in SkShader::appendStages()
to cover more cases, and making sure subclasses call appendStages() so
they can get the fallback, not onAppendStages() directly.
We still need to watch for SkShader::makeContext() failing in the
fallback itself, so sadly SkShader::appendStages() may still fail.
Change-Id: I2314b234a24bdcecac401a385ce050d7fdf0a83e
Reviewed-on: https://skia-review.googlesource.com/16369
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include/core/SkShader.h')
-rw-r--r-- | include/core/SkShader.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h index cee7933d67..b253b6b852 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -464,8 +464,8 @@ public: SK_DEFINE_FLATTENABLE_TYPE(SkShader) SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() - bool appendStages(SkRasterPipeline*, SkColorSpace*, SkArenaAlloc*, - const SkMatrix& ctm, const SkPaint&) const; + bool appendStages(SkRasterPipeline*, SkColorSpace* dstCS, SkArenaAlloc*, + const SkMatrix& ctm, const SkPaint&, const SkMatrix* localM=nullptr) const; protected: void flatten(SkWriteBuffer&) const override; @@ -496,10 +496,6 @@ protected: return nullptr; } - virtual bool onAppendStages(SkRasterPipeline*, SkColorSpace*, SkArenaAlloc*, - const SkMatrix&, const SkPaint&, - const SkMatrix* /*local matrix*/) const; - /** * Returns a shader transformed into a new color space via the |xformer|. */ @@ -511,6 +507,9 @@ protected: } private: + virtual bool onAppendStages(SkRasterPipeline*, SkColorSpace* dstCS, SkArenaAlloc*, + const SkMatrix&, const SkPaint&, const SkMatrix* localM) const; + // This is essentially const, but not officially so it can be modified in constructors. SkMatrix fLocalMatrix; |