diff options
author | 2012-10-19 02:01:19 +0000 | |
---|---|---|
committer | 2012-10-19 02:01:19 +0000 | |
commit | 6a748ad8d82576c4ce59e9b2409d41a93bf05cdf (patch) | |
tree | e671d051a50a0caeab8e2bb85284ef25b02a69ed | |
parent | c7a37c7bb2279d8c15d6fcbaf38f59dbd727eb6c (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6013 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | debugger/SkObjectParser.cpp | 6 | ||||
-rw-r--r-- | gm/gmmain.cpp | 4 | ||||
-rw-r--r-- | gm/tilemodes.cpp | 20 | ||||
-rw-r--r-- | src/core/SkGeometry.cpp | 4 | ||||
-rw-r--r-- | tests/PathTest.cpp | 6 |
5 files changed, 20 insertions, 20 deletions
diff --git a/debugger/SkObjectParser.cpp b/debugger/SkObjectParser.cpp index 0cac6c9d67..aa6da67c10 100644 --- a/debugger/SkObjectParser.cpp +++ b/debugger/SkObjectParser.cpp @@ -72,7 +72,7 @@ SkString* SkObjectParser::PathToString(const SkPath& path) { SkString* mPath = new SkString("Path ("); static const char* gConvexityStrings[] = { - "Unknown", "Convex", "Concave" + "Unknown", "Convex", "Concave" }; SkASSERT(SkPath::kConcave_Convexity == 2); @@ -95,8 +95,8 @@ SkString* SkObjectParser::PathToString(const SkPath& path) { SkPath::Verb verb; SkPoint points[4]; - for(verb = iter.next(points, false); - verb != SkPath::kDone_Verb; + for(verb = iter.next(points, false); + verb != SkPath::kDone_Verb; verb = iter.next(points, false)) { mPath->append(gVerbStrings[verb]); diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 9a9ccb16e0..488e3e755f 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -944,7 +944,7 @@ int tool_main(int argc, char** argv) { continue; } moduloIndex = atoi(*argv); - + ++argv; if (argv >= stop) { continue; @@ -1050,7 +1050,7 @@ int tool_main(int argc, char** argv) { Iter iter; GM* gm; while ((gm = iter.next()) != NULL) { - + ++gmIndex; if (moduloIndex >= 0) { if ((gmIndex % moduloCount) != moduloIndex) { diff --git a/gm/tilemodes.cpp b/gm/tilemodes.cpp index 36b26087ac..674576965a 100644 --- a/gm/tilemodes.cpp +++ b/gm/tilemodes.cpp @@ -173,7 +173,7 @@ static SkShader* make_radial(SkShader::TileMode tx, SkShader::TileMode ty) { SkPoint center = { SkIntToScalar(gWidth)/2, SkIntToScalar(gHeight)/2 }; SkScalar rad = SkIntToScalar(gWidth)/2; SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE }; - + return SkGradientShader::CreateRadial(center, rad, colors, NULL, SK_ARRAY_COUNT(colors), tx); } @@ -186,14 +186,14 @@ public: Tiling2GM(ShaderProc proc, const char name[]) : fProc(proc) { fName.printf("tilemode_%s", name); } - + protected: SkString onShortName() { return fName; } - + SkISize onISize() { return SkISize::Make(880, 560); } - + virtual void onDraw(SkCanvas* canvas) { canvas->scale(SkIntToScalar(3)/2, SkIntToScalar(3)/2); @@ -207,10 +207,10 @@ protected: static const char* gModeNames[] = { "Clamp", "Repeat", "Mirror" }; - + SkScalar y = SkIntToScalar(24); SkScalar x = SkIntToScalar(66); - + SkPaint p; p.setAntiAlias(true); p.setTextAlign(SkPaint::kCenter_Align); @@ -220,7 +220,7 @@ protected: canvas->drawText(str.c_str(), str.size(), x + r.width()/2, y, p); x += r.width() * 4 / 3; } - + y += SkIntToScalar(16) + h; p.setTextAlign(SkPaint::kRight_Align); @@ -234,18 +234,18 @@ protected: for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) { SkPaint paint; paint.setShader(fProc(gModes[kx], gModes[ky]))->unref(); - + canvas->save(); canvas->translate(x, y); canvas->drawRect(r, paint); canvas->restore(); - + x += r.width() * 4 / 3; } y += r.height() * 4 / 3; } } - + private: typedef skiagm::GM INHERITED; }; diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp index 95b6247801..137cd795c1 100644 --- a/src/core/SkGeometry.cpp +++ b/src/core/SkGeometry.cpp @@ -1256,8 +1256,8 @@ static bool quad_pt2OffCurve(const SkPoint quad[3], SkScalar x, SkScalar y, SkPo #ifdef SK_SCALAR_IS_FLOAT // Due to floating point issues (i.e., 1.0f - SK_ScalarRoot2Over2 != -// SK_ScalarRoot2Over2 - SK_ScalarTanPIOver8) a cruder root2over2 -// approximation is required to make the quad circle points convex. The +// SK_ScalarRoot2Over2 - SK_ScalarTanPIOver8) a cruder root2over2 +// approximation is required to make the quad circle points convex. The // root of the problem is that with the root2over2 value in SkScalar.h // the arcs really are ever so slightly concave. Some alternative fixes // to this problem (besides just arbitrarily pushing out the mid-point as diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index d035b34200..819d3b3e87 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -77,8 +77,8 @@ static void test_isfinite_after_transform(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, path.getBounds().isEmpty()); } -static void add_corner_arc(SkPath* path, const SkRect& rect, - SkScalar xIn, SkScalar yIn, +static void add_corner_arc(SkPath* path, const SkRect& rect, + SkScalar xIn, SkScalar yIn, int startAngle) { @@ -107,7 +107,7 @@ static void add_corner_arc(SkPath* path, const SkRect& rect, path->arcTo(arcRect, SkIntToScalar(startAngle), SkIntToScalar(90), false); } -static void make_arb_round_rect(SkPath* path, const SkRect& r, +static void make_arb_round_rect(SkPath* path, const SkRect& r, SkScalar xCorner, SkScalar yCorner) { // we are lazy here and use the same x & y for each corner add_corner_arc(path, r, xCorner, yCorner, 270); |