Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8714 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-04-17 07:00:56 +00:00
parent 5c082a14ac
commit 45fb8b6013
4 changed files with 7 additions and 8 deletions

View File

@ -32,7 +32,7 @@ static void test_bitmaprect(SkCanvas* canvas) {
make_bm(&bm);
canvas->drawBitmap(bm, 150, 45, NULL);
SkScalar scale = 0.472560018f;
canvas->scale(scale, scale);
canvas->drawBitmapRectToRect(bm, NULL, SkRect::MakeXYWH(100, 100, 128, 128), NULL);
@ -64,4 +64,3 @@ private:
//////////////////////////////////////////////////////////////////////////////
DEF_GM( return new BitmapRectTestGM; )

View File

@ -227,7 +227,7 @@ struct SkRationalQuad {
bool findYExtrema(SkScalar* t) const;
bool chopAtXExtrema(SkRationalQuad dst[2]) const;
bool chopAtYExtrema(SkRationalQuad dst[2]) const;
void computeTightBounds(SkRect* bounds) const;
void computeFastBounds(SkRect* bounds) const;
};

View File

@ -1409,18 +1409,18 @@ static void rat_numer_coeff(const SkScalar src[], SkScalar w, SkScalar coeff[3])
static SkScalar rat_eval_pos(const SkScalar src[], SkScalar w, SkScalar t) {
SkASSERT(src);
SkASSERT(t >= 0 && t <= SK_Scalar1);
SkScalar src2w = SkScalarMul(src[2], w);
SkScalar C = src[0];
SkScalar A = src[4] - 2 * src2w + C;
SkScalar B = 2 * (src2w - C);
SkScalar numer = SkScalarMulAdd(SkScalarMulAdd(A, t, B), t, C);
B = 2 * (w - SK_Scalar1);
C = SK_Scalar1;
A = -B;
SkScalar denom = SkScalarMulAdd(SkScalarMulAdd(A, t, B), t, C);
return SkScalarDiv(numer, denom);
}
@ -1447,7 +1447,7 @@ static bool rat_find_extrema(const SkScalar src[], SkScalar w, SkScalar* t) {
SkScalar tValues[2];
int roots = SkFindUnitQuadRoots(coeff[0], coeff[1], coeff[2], tValues);
SkASSERT(0 == roots || 1 == roots);
if (1 == roots) {
*t = tValues[0];
return true;

View File

@ -174,7 +174,7 @@ static void TestSurfaceNoCanvas(skiatest::Reporter* reporter,
surface->validate();
REPORTER_ASSERT(reporter, image1 != image2);
}
}
static void TestSurface(skiatest::Reporter* reporter, GrContextFactory* factory) {