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>
This commit is contained in:
parent
c8a65e3e6e
commit
e8d55d5ab0
@ -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) {}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user