diff options
author | Mike Reed <reed@google.com> | 2017-06-21 18:54:51 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-21 18:55:01 +0000 |
commit | 19d0b99922712df3f07ba4622f1e5ccddc3b7168 (patch) | |
tree | 407cb28f9cf02a4ba222699fcf1bf15be60ff214 /src | |
parent | 00b8ab61ddf6723a593bfcc931bbabb957aa7b19 (diff) |
Revert "use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code)"
This reverts commit 00b8ab61ddf6723a593bfcc931bbabb957aa7b19.
Reason for revert: breaks nanobench
Original change's description:
> use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code)
>
> Definitely changes some GMs, but I think they're all more correct.
>
> Bug: skia:
> Change-Id: Ic30622f2c17325bce4c82b4d7997036d3cc026c2
> Reviewed-on: https://skia-review.googlesource.com/20363
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I6b7e8d68deb8b62bd9688c95a5937a0bba8b4cf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20431
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/shaders/SkColorFilterShader.h | 3 | ||||
-rw-r--r-- | src/shaders/SkImageShader.cpp | 16 | ||||
-rw-r--r-- | src/shaders/SkImageShader.h | 3 | ||||
-rw-r--r-- | src/shaders/SkPictureShader.cpp | 4 | ||||
-rw-r--r-- | src/shaders/SkPictureShader.h | 1 |
5 files changed, 0 insertions, 27 deletions
diff --git a/src/shaders/SkColorFilterShader.h b/src/shaders/SkColorFilterShader.h index 662c267943..6a3f65eade 100644 --- a/src/shaders/SkColorFilterShader.h +++ b/src/shaders/SkColorFilterShader.h @@ -51,9 +51,6 @@ protected: sk_sp<SkShader> onMakeColorSpace(SkColorSpaceXformer* xformer) const override; bool onAppendStages(SkRasterPipeline*, SkColorSpace* dstCS, SkArenaAlloc*, const SkMatrix&, const SkPaint&, const SkMatrix* localM) const override; - bool isRasterPipelineOnly() const override { - return as_SB(fShader)->isRasterPipelineOnly(); - } private: sk_sp<SkShader> fShader; diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp index dbb433ae4e..808b856d8a 100644 --- a/src/shaders/SkImageShader.cpp +++ b/src/shaders/SkImageShader.cpp @@ -48,22 +48,6 @@ bool SkImageShader::isOpaque() const { return fImage->isOpaque(); } -bool SkImageShader::IsRasterPipelineOnly(SkColorType ct, SkShader::TileMode tx, - SkShader::TileMode ty) { - if (ct != kN32_SkColorType) { - return true; - } - if (tx != SkShader::kClamp_TileMode || ty != SkShader::kClamp_TileMode) { - return true; - } - return false; -} - -bool SkImageShader::isRasterPipelineOnly() const { - SkBitmapProvider provider(fImage.get(), nullptr); - return IsRasterPipelineOnly(provider.info().colorType(), fTileModeX, fTileModeY); -} - SkShaderBase::Context* SkImageShader::onMakeContext(const ContextRec& rec, SkArenaAlloc* alloc) const { return SkBitmapProcLegacyShader::MakeContext(*this, fTileModeX, fTileModeY, diff --git a/src/shaders/SkImageShader.h b/src/shaders/SkImageShader.h index e68abb5d5a..7be982c5c6 100644 --- a/src/shaders/SkImageShader.h +++ b/src/shaders/SkImageShader.h @@ -19,7 +19,6 @@ public: const SkMatrix* localMatrix); bool isOpaque() const override; - bool isRasterPipelineOnly() const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageShader) @@ -30,8 +29,6 @@ public: SkImageShader(sk_sp<SkImage>, TileMode tx, TileMode ty, const SkMatrix* localMatrix); - static bool IsRasterPipelineOnly(SkColorType, SkShader::TileMode tx, SkShader::TileMode ty); - protected: void flatten(SkWriteBuffer&) const override; Context* onMakeContext(const ContextRec&, SkArenaAlloc* storage) const override; diff --git a/src/shaders/SkPictureShader.cpp b/src/shaders/SkPictureShader.cpp index d80a7da1f9..4bef53da75 100644 --- a/src/shaders/SkPictureShader.cpp +++ b/src/shaders/SkPictureShader.cpp @@ -265,10 +265,6 @@ sk_sp<SkShader> SkPictureShader::refBitmapShader(const SkMatrix& viewMatrix, con return tileShader; } -bool SkPictureShader::isRasterPipelineOnly() const { - return SkImageShader::IsRasterPipelineOnly(kN32_SkColorType, fTmx, fTmy); -} - bool SkPictureShader::onAppendStages(SkRasterPipeline* p, SkColorSpace* cs, SkArenaAlloc* alloc, const SkMatrix& ctm, const SkPaint& paint, const SkMatrix* localMatrix) const { diff --git a/src/shaders/SkPictureShader.h b/src/shaders/SkPictureShader.h index 6fd2a3a9f5..f7a509f181 100644 --- a/src/shaders/SkPictureShader.h +++ b/src/shaders/SkPictureShader.h @@ -39,7 +39,6 @@ protected: const SkMatrix&, const SkPaint&, const SkMatrix*) const override; Context* onMakeContext(const ContextRec&, SkArenaAlloc*) const override; sk_sp<SkShader> onMakeColorSpace(SkColorSpaceXformer* xformer) const override; - bool isRasterPipelineOnly() const override; private: SkPictureShader(sk_sp<SkPicture>, TileMode, TileMode, const SkMatrix*, const SkRect*, |