aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-10-25 14:58:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-25 19:23:45 +0000
commite8d55d5ab0df2732e506b654e9254a001df197a9 (patch)
tree0216440f03b48e455697375b3d3403839adb9e66
parentc8a65e3e6ee5505e44ad1e8adcd3189edc61328c (diff)
Remove unused (?) gradient context class
Bug: skia: Change-Id: Id8a561e8d95fb0405cba2f2a5c3165667344579e Reviewed-on: https://skia-review.googlesource.com/63860 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r--src/shaders/gradients/SkGradientShader.cpp25
-rw-r--r--src/shaders/gradients/SkGradientShaderPriv.h20
2 files changed, 0 insertions, 45 deletions
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp
index 2e784bb987..134a5c2dff 100644
--- a/src/shaders/gradients/SkGradientShader.cpp
+++ b/src/shaders/gradients/SkGradientShader.cpp
@@ -497,31 +497,6 @@ bool SkGradientShaderBase::onAsLuminanceColor(SkColor* lum) const {
return true;
}
-SkGradientShaderBase::GradientShaderBaseContext::GradientShaderBaseContext(
- const SkGradientShaderBase& shader, const ContextRec& rec)
- : INHERITED(shader, rec)
- , fCache(shader.refCache())
-{
- const SkMatrix& inverse = this->getTotalInverse();
-
- fDstToIndex.setConcat(shader.fPtsToUnit, inverse);
- SkASSERT(!fDstToIndex.hasPerspective());
-
- fDstToIndexProc = SkMatrixPriv::GetMapXYProc(fDstToIndex);
-
- // now convert our colors in to PMColors
- unsigned paintAlpha = this->getPaintAlpha();
-
- fFlags = this->INHERITED::getFlags();
- if (shader.fColorsAreOpaque && paintAlpha == 0xFF) {
- fFlags |= kOpaqueAlpha_Flag;
- }
-}
-
-bool SkGradientShaderBase::GradientShaderBaseContext::isValid() const {
- return fDstToIndex.isFinite();
-}
-
SkGradientShaderBase::GradientShaderCache::GradientShaderCache(const SkGradientShaderBase& shader)
: fCache32(nullptr) // Only initialize the cache in getCache32.
, fShader(shader) {}
diff --git a/src/shaders/gradients/SkGradientShaderPriv.h b/src/shaders/gradients/SkGradientShaderPriv.h
index 775cb39b85..7916e6951f 100644
--- a/src/shaders/gradients/SkGradientShaderPriv.h
+++ b/src/shaders/gradients/SkGradientShaderPriv.h
@@ -145,26 +145,6 @@ public:
uint32_t gradFlags);
};
- class GradientShaderBaseContext : public Context {
- public:
- GradientShaderBaseContext(const SkGradientShaderBase& shader, const ContextRec&);
-
- uint32_t getFlags() const override { return fFlags; }
-
- bool isValid() const;
-
- protected:
- SkMatrix fDstToIndex;
- SkMatrixPriv::MapXYProc fDstToIndexProc;
- uint8_t fDstToIndexClass;
- uint8_t fFlags;
-
- sk_sp<GradientShaderCache> fCache;
-
- private:
- typedef Context INHERITED;
- };
-
bool isOpaque() const override;
enum class GradientBitmapType : uint8_t {