From 5e9bf82814aa5d1503c39dd14c420d6db30055dc Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Tue, 17 Jan 2012 14:39:21 +0000 Subject: [PATCH] second try to fix assert git-svn-id: http://skia.googlecode.com/svn/trunk@3042 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrPathUtils.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp index 6bb72a8..349b887 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); -- 2.7.4