fix all the false --> NULL issues in the gradient code
BUG=
Review URL: https://codereview.appspot.com/7095056
git-svn-id: http://skia.googlecode.com/svn/trunk@7170 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 8ae7646..fc5653b 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -550,7 +550,7 @@
SkASSERT(NULL != context);
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
- return false;
+ return NULL;
}
matrix.postConcat(fPtsToUnit);
return SkNEW_ARGS(GrLinearGradient, (context, *this, matrix, fTileMode));
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index b9c4e3b..d31cebd 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -574,7 +574,7 @@
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
- return false;
+ return NULL;
}
matrix.postConcat(fPtsToUnit);
return SkNEW_ARGS(GrRadialGradient, (context, *this, matrix, fTileMode));
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 918bf91..8e7ef96 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -475,7 +475,7 @@
GrEffect* SkSweepGradient::asNewEffect(GrContext* context, const SkPaint&) const {
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
- return false;
+ return NULL;
}
matrix.postConcat(fPtsToUnit);
return SkNEW_ARGS(GrSweepGradient, (context, *this, matrix));
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 6fab6d4..37b8a51 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -690,7 +690,7 @@
// invert the localM, translate to center1, rotate so center2 is on x axis.
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
- return false;
+ return NULL;
}
matrix.postTranslate(-fCenter1.fX, -fCenter1.fY);
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 61ed3d5..075e940 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -662,7 +662,7 @@
// invert the localM, translate to center1 (fPtsToUni), rotate so center2 is on x axis.
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
- return false;
+ return NULL;
}
matrix.postConcat(fPtsToUnit);