Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient.cpp

Issue 1287263005: change asABitmap to isABitmap on shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/effects/gradients/SkTwoPointConicalGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 56b9458605440736946f1501da30c3db06deab8b..1cdb19e1b9bc2b3726b2facae8c005dc64fb5ef1 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 {

Powered by Google App Engine
This is Rietveld 408576698