Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12499 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-12-05 07:02:16 +00:00
parent 967b258065
commit 8491d24bdc
2 changed files with 3 additions and 3 deletions

View File

@ -210,7 +210,7 @@ void GrPathUtils::QuadUVMatrix::set(const GrPoint qPts[3]) {
double y2 = qPts[2].fY;
double det = x0*y1 - y0*x1 + x2*y0 - y2*x0 + x1*y2 - y1*x2;
if (!sk_float_isfinite(det)
if (!sk_float_isfinite(det)
|| SkScalarNearlyZero((float)det, SK_ScalarNearlyZero * SK_ScalarNearlyZero)) {
// The quad is degenerate. Hopefully this is rare. Find the pts that are
// farthest apart to compute a line (unless it is really a pt).
@ -266,7 +266,7 @@ void GrPathUtils::QuadUVMatrix::set(const GrPoint qPts[3]) {
a7 = x1-x0;
a8 = x0*y1-x1*y0;
// this performs the uv_pts*adjugate(control_pts) multiply,
// this performs the uv_pts*adjugate(control_pts) multiply,
// then does the scale by 1/det afterwards to improve precision
m[SkMatrix::kMScaleX] = (float)((0.5*a3 + a6)*scale);
m[SkMatrix::kMSkewX] = (float)((0.5*a4 + a7)*scale);

View File

@ -311,7 +311,7 @@ static void Tests(skiatest::Reporter* reporter) {
invalidBitmap2.setConfig(SkBitmap::kARGB_8888_Config, 256, 256);
invalidBitmap2.setPixelRef(SkNEW_ARGS(SkMallocPixelRef,
(NULL, 256, NULL)))->unref();
// The deserialization should detect the pixel ref being too small and fail
TestBitmapSerialization(validBitmap, invalidBitmap2, false, reporter);
}