aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-17 14:39:21 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-17 14:39:21 +0000
commit5e9bf82814aa5d1503c39dd14c420d6db30055dc (patch)
tree058db94e9a2d84396948e42b8fccde6f575d62ca /src
parent5ce2796854bfd45be8293c55467b6cd9582c5420 (diff)
second try to fix assert
git-svn-id: http://skia.googlecode.com/svn/trunk@3042 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrPathUtils.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp
index 6bb72a8b1d..349b887e1c 100644
--- a/src/gpu/GrPathUtils.cpp
+++ b/src/gpu/GrPathUtils.cpp
@@ -193,8 +193,10 @@ namespace {
// However, the first two entries of the perspective row may be really close to
// 0 and the third may not be 1 due to a scale on the entire matrix.
inline void fixup_matrix(GrMatrix* mat) {
- GrAssert(SK_SCALAR_IS_FLOAT);
- static const GrScalar gTOL = 1.f / 100.f;
+#ifndef SK_SCALAR_IS_FLOAT
+ GrCrash("Expected scalar is float.");
+#endif
+ static const GrScalar gTOL = 1.f / 100.f;
GrAssert(GrScalarAbs(mat->get(SkMatrix::kMPersp0)) < gTOL);
GrAssert(GrScalarAbs(mat->get(SkMatrix::kMPersp1)) < gTOL);
float m33 = mat->get(SkMatrix::kMPersp2);
@@ -220,7 +222,10 @@ void GrPathUtils::quadDesignSpaceToUVCoordsMatrix(const SkPoint qPts[3],
GrMatrix* matrix) {
// can't make this static, no cons :(
SkMatrix UVpts;
- GrAssert(SK_SCALAR_IS_FLOAT);
+#ifndef SK_SCALAR_IS_FLOAT
+ GrCrash("Expected scalar is float.");
+#endif
+
UVpts.setAll(0, 0.5f, 1.f,
0, 0, 1.f,
1.f, 1.f, 1.f);