diff options
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/gradients/SkLinearGradient.cpp | 16 | ||||
-rw-r--r-- | src/effects/gradients/SkLinearGradient.h | 1 | ||||
-rw-r--r-- | src/effects/gradients/SkRadialGradient.cpp | 17 | ||||
-rw-r--r-- | src/effects/gradients/SkRadialGradient.h | 1 | ||||
-rw-r--r-- | src/effects/gradients/SkSweepGradient.cpp | 15 | ||||
-rw-r--r-- | src/effects/gradients/SkSweepGradient.h | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkTwoPointConicalGradient.cpp | 29 | ||||
-rw-r--r-- | src/effects/gradients/SkTwoPointConicalGradient.h | 1 |
8 files changed, 0 insertions, 82 deletions
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index fb0aa9836a..d9b4a5c9b0 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -261,22 +261,6 @@ void SkLinearGradient::LinearGradientContext::shadeSpan(int x, int y, SkPMColor* } } -SkShader::BitmapType SkLinearGradient::asABitmap(SkBitmap* bitmap, - SkMatrix* matrix, - TileMode xy[]) const { - if (bitmap) { - this->getGradientTableBitmap(bitmap); - } - if (matrix) { - matrix->preConcat(fPtsToUnit); - } - if (xy) { - xy[0] = fTileMode; - xy[1] = kClamp_TileMode; - } - return kLinear_BitmapType; -} - SkShader::GradientType SkLinearGradient::asAGradient(GradientInfo* info) const { if (info) { commonAsAGradient(info); diff --git a/src/effects/gradients/SkLinearGradient.h b/src/effects/gradients/SkLinearGradient.h index 2330f5be06..eddb35512f 100644 --- a/src/effects/gradients/SkLinearGradient.h +++ b/src/effects/gradients/SkLinearGradient.h @@ -28,7 +28,6 @@ public: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; }; - BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const override; GradientType asAGradient(GradientInfo* info) const override; bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, GrProcessorDataManager*, diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index 4ff635ab47..a6a00cdf7b 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp @@ -225,23 +225,6 @@ void SkRadialGradient::RadialGradientContext::shadeSpan16(int x, int y, uint16_t } } -SkShader::BitmapType SkRadialGradient::asABitmap(SkBitmap* bitmap, - SkMatrix* matrix, SkShader::TileMode* xy) const { - if (bitmap) { - this->getGradientTableBitmap(bitmap); - } - if (matrix) { - matrix->setScale(SkIntToScalar(kCache32Count), - SkIntToScalar(kCache32Count)); - matrix->preConcat(fPtsToUnit); - } - if (xy) { - xy[0] = fTileMode; - xy[1] = kClamp_TileMode; - } - return kRadial_BitmapType; -} - SkShader::GradientType SkRadialGradient::asAGradient(GradientInfo* info) const { if (info) { commonAsAGradient(info); diff --git a/src/effects/gradients/SkRadialGradient.h b/src/effects/gradients/SkRadialGradient.h index 0e3a893eae..d0f63ac54d 100644 --- a/src/effects/gradients/SkRadialGradient.h +++ b/src/effects/gradients/SkRadialGradient.h @@ -28,7 +28,6 @@ public: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; }; - BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, TileMode* xy) const override; GradientType asAGradient(GradientInfo* info) const override; bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, GrProcessorDataManager*, diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp index 1881690494..22bf68eaea 100644 --- a/src/effects/gradients/SkSweepGradient.cpp +++ b/src/effects/gradients/SkSweepGradient.cpp @@ -22,21 +22,6 @@ SkSweepGradient::SkSweepGradient(SkScalar cx, SkScalar cy, const Descriptor& des fTileMode = SkShader::kClamp_TileMode; } -SkShader::BitmapType SkSweepGradient::asABitmap(SkBitmap* bitmap, - SkMatrix* matrix, SkShader::TileMode* xy) const { - if (bitmap) { - this->getGradientTableBitmap(bitmap); - } - if (matrix) { - *matrix = fPtsToUnit; - } - if (xy) { - xy[0] = fTileMode; - xy[1] = kClamp_TileMode; - } - return kSweep_BitmapType; -} - SkShader::GradientType SkSweepGradient::asAGradient(GradientInfo* info) const { if (info) { commonAsAGradient(info); diff --git a/src/effects/gradients/SkSweepGradient.h b/src/effects/gradients/SkSweepGradient.h index e9d5fb781f..bc465bdc44 100644 --- a/src/effects/gradients/SkSweepGradient.h +++ b/src/effects/gradients/SkSweepGradient.h @@ -28,8 +28,6 @@ public: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; }; - BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, TileMode* xy) const override; - GradientType asAGradient(GradientInfo* info) const override; bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp index 56b9458605..1cdb19e1b9 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient.cpp +++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp @@ -292,35 +292,6 @@ void SkTwoPointConicalGradient::TwoPointConicalGradientContext::shadeSpan( } } -SkShader::BitmapType SkTwoPointConicalGradient::asABitmap( - SkBitmap* bitmap, SkMatrix* matrix, SkShader::TileMode* xy) const { - SkPoint diff = fCenter2 - fCenter1; - SkScalar diffLen = 0; - - if (bitmap) { - this->getGradientTableBitmap(bitmap); - } - if (matrix) { - diffLen = diff.length(); - } - if (matrix) { - if (diffLen) { - SkScalar invDiffLen = SkScalarInvert(diffLen); - // rotate to align circle centers with the x-axis - matrix->setSinCos(-SkScalarMul(invDiffLen, diff.fY), - SkScalarMul(invDiffLen, diff.fX)); - } else { - matrix->reset(); - } - matrix->preTranslate(-fCenter1.fX, -fCenter1.fY); - } - if (xy) { - xy[0] = fTileMode; - xy[1] = kClamp_TileMode; - } - return kTwoPointConical_BitmapType; -} - // Returns the original non-sorted version of the gradient SkShader::GradientType SkTwoPointConicalGradient::asAGradient( GradientInfo* info) const { diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h index 010857c55e..8bba9e1b7f 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient.h +++ b/src/effects/gradients/SkTwoPointConicalGradient.h @@ -58,7 +58,6 @@ public: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; }; - BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, TileMode* xy) const override; SkShader::GradientType asAGradient(GradientInfo* info) const override; bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&, const SkMatrix*, GrColor*, GrProcessorDataManager*, |