diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-08 07:01:40 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-08 07:01:40 +0000 |
commit | 2b34fe01d7b5736b212eb4886afc723a7b9241ae (patch) | |
tree | 32a2a6b1eef8bbc6026f625ebf9c2675cb07b5cc | |
parent | 6862cbad085729acb77825392c8c2a4f888a99cf (diff) |
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9051 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkStream.h | 2 | ||||
-rw-r--r-- | src/core/SkGeometry.cpp | 1 | ||||
-rw-r--r-- | src/pathops/SkOpAngle.cpp | 4 | ||||
-rw-r--r-- | src/sfnt/SkTTCFHeader.h | 2 | ||||
-rw-r--r-- | tests/PathOpsCubicQuadIntersectionTest.cpp | 12 | ||||
-rw-r--r-- | tests/PathOpsLineIntersectionTest.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsSkpClipTest.cpp | 122 |
7 files changed, 72 insertions, 73 deletions
diff --git a/include/core/SkStream.h b/include/core/SkStream.h index f968c46e19..310f939439 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -23,7 +23,7 @@ class SkData; * bytes, they may return fewer than N bytes on a given call, in which case * the caller can "try again" to get more bytes, eventually (modulo an error) * receiving their total N bytes. - * + * * Skia streams behave differently. They are effectively synchronous, and will * always return all N bytes of the request if possible. If they return fewer * (the read() call returns the number of bytes read) then that means there is diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp index 20045785dc..f67758d2b4 100644 --- a/src/core/SkGeometry.cpp +++ b/src/core/SkGeometry.cpp @@ -1662,4 +1662,3 @@ void SkConic::computeTightBounds(SkRect* bounds) const { void SkConic::computeFastBounds(SkRect* bounds) const { bounds->set(fPts, 3); } - diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp index 750520a73f..aa72394043 100644 --- a/src/pathops/SkOpAngle.cpp +++ b/src/pathops/SkOpAngle.cpp @@ -141,7 +141,7 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { SkDVector dxy = loc - ray[0]; double dist = dxy.lengthSquared(); #if DEBUG_SORT - SkDebugf("best=%1.9g dist=%1.9g loc={%1.9g,%1.9g} dxy={%1.9g,%1.9g}\n", + SkDebugf("best=%1.9g dist=%1.9g loc={%1.9g,%1.9g} dxy={%1.9g,%1.9g}\n", best, dist, loc.fX, loc.fY, dxy.fX, dxy.fY); #endif if (best > dist) { @@ -156,7 +156,7 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { SkDVector dxy = rLoc - ray[0]; double dist = dxy.lengthSquared(); #if DEBUG_SORT - SkDebugf("best=%1.9g dist=%1.9g %c=(fSide < 0) rLoc={%1.9g,%1.9g} dxy={%1.9g,%1.9g}\n", + SkDebugf("best=%1.9g dist=%1.9g %c=(fSide < 0) rLoc={%1.9g,%1.9g} dxy={%1.9g,%1.9g}\n", best, dist, "><"[fSide < 0], rLoc.fX, rLoc.fY, dxy.fX, dxy.fY); #endif if (best > dist) { diff --git a/src/sfnt/SkTTCFHeader.h b/src/sfnt/SkTTCFHeader.h index ffe792b857..8f53c03229 100644 --- a/src/sfnt/SkTTCFHeader.h +++ b/src/sfnt/SkTTCFHeader.h @@ -23,7 +23,7 @@ struct SkTTCFHeader { SK_OT_Fixed version; static const SK_OT_Fixed version_1 = SkTEndian_SwapBE32(1 << 16); static const SK_OT_Fixed version_2 = SkTEndian_SwapBE32(2 << 16); - + SK_OT_ULONG numOffsets; //SK_OT_ULONG offset[numOffsets] diff --git a/tests/PathOpsCubicQuadIntersectionTest.cpp b/tests/PathOpsCubicQuadIntersectionTest.cpp index 8b47a8e60f..8a31814ee4 100644 --- a/tests/PathOpsCubicQuadIntersectionTest.cpp +++ b/tests/PathOpsCubicQuadIntersectionTest.cpp @@ -16,12 +16,12 @@ static struct lineCubic { int answerCount; SkDPoint answers[2]; } quadCubicTests[] = { - {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}},
- {{{18,226}, {14.686291694641113,226}, {12.342399597167969,228.3424072265625}}}, 1,
- {{18,226}, {0,0}}},
- {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}},
- {{{12.342399597167969,228.3424072265625}, {10,230.68629455566406}, {10,234}}}, 1,
- {{10,234}, {0,0}}},
+ {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}}, + {{{18,226}, {14.686291694641113,226}, {12.342399597167969,228.3424072265625}}}, 1, + {{18,226}, {0,0}}}, + {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}}, + {{{12.342399597167969,228.3424072265625}, {10,230.68629455566406}, {10,234}}}, 1, + {{10,234}, {0,0}}}, }; static const size_t quadCubicTests_count = SK_ARRAY_COUNT(quadCubicTests); diff --git a/tests/PathOpsLineIntersectionTest.cpp b/tests/PathOpsLineIntersectionTest.cpp index b1bb66716b..db6003da9d 100644 --- a/tests/PathOpsLineIntersectionTest.cpp +++ b/tests/PathOpsLineIntersectionTest.cpp @@ -91,7 +91,7 @@ static void PathOpsLineIntersectionTest(skiatest::Reporter* reporter) { const SkDLine& line2 = noIntersect[index][1]; SkIntersections ts; int pts = ts.intersect(line1, line2); - REPORTER_ASSERT(reporter, !pts); + REPORTER_ASSERT(reporter, !pts); REPORTER_ASSERT(reporter, pts == ts.used()); } } diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp index 595a91a99f..d14cde54ce 100644 --- a/tests/PathOpsSkpClipTest.cpp +++ b/tests/PathOpsSkpClipTest.cpp @@ -1,61 +1,61 @@ -#include "SkBitmap.h"
-#include "SkDevice.h"
-#include "SkCanvas.h"
-#include "SkImageEncoder.h"
-#include "SkStream.h"
-#include "SkOSFile.h"
-#include "SkPicture.h"
-#include "SkString.h"
-#include "Test.h"
-
-static void make_filepath(SkString* path, const char* dir, const SkString& name) {
- size_t len = strlen(dir);
- path->set(dir);
- if (len > 0 && dir[len - 1] != '/') {
- path->append("\\");
- }
- path->append(name);
-}
-
-static void PathOpsSkpClipTest(skiatest::Reporter* reporter) {
-const char pictDir[] = "C:\\Users\\caryclark\\skp";
- const char outSkpClipDir[] = "C:\\Users\\caryclark\\skpClip";
- const char outOldClipDir[] = "C:\\Users\\caryclark\\oldClip";
- SkOSFile::Iter iter(pictDir, "skp");
- SkString filename;
- while (iter.next(&filename)) {
-#if 0
- if (strcmp(filename.c_str(), "tabl_androidpolice.skp")) {
- continue;
- }
-#endif
- SkString path;
- make_filepath(&path, pictDir, filename);
- SkFILEStream stream(path.c_str());
- if (!stream.isValid()) {
- continue;
- }
- SkPicture* pic = SkNEW_ARGS(SkPicture, (&stream));
- int width = pic->width();
- int height = pic->height();
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
- bitmap.allocPixels();
- SkCanvas canvas(bitmap);
- filename.remove(filename.size() - 3, 3);
- filename.append("png");
- for (int i = 0; i < 2; ++i) {
- bool useOp = i ? true : false;
- canvas.setAllowSimplifyClip(useOp);
- pic->draw(&canvas);
- SkString outFile;
- make_filepath(&outFile, useOp ? outSkpClipDir : outOldClipDir, filename);
- SkImageEncoder::EncodeFile(outFile.c_str(), bitmap, SkImageEncoder::kPNG_Type, 100);
- }
- SkDELETE(pic);
- reporter->bumpTestCount();
- }
-}
-
-#include "TestClassDef.h"
-DEFINE_TESTCLASS_SHORT(PathOpsSkpClipTest)
+#include "SkBitmap.h" +#include "SkDevice.h" +#include "SkCanvas.h" +#include "SkImageEncoder.h" +#include "SkStream.h" +#include "SkOSFile.h" +#include "SkPicture.h" +#include "SkString.h" +#include "Test.h" + +static void make_filepath(SkString* path, const char* dir, const SkString& name) { + size_t len = strlen(dir); + path->set(dir); + if (len > 0 && dir[len - 1] != '/') { + path->append("\\"); + } + path->append(name); +} + +static void PathOpsSkpClipTest(skiatest::Reporter* reporter) { +const char pictDir[] = "C:\\Users\\caryclark\\skp"; + const char outSkpClipDir[] = "C:\\Users\\caryclark\\skpClip"; + const char outOldClipDir[] = "C:\\Users\\caryclark\\oldClip"; + SkOSFile::Iter iter(pictDir, "skp"); + SkString filename; + while (iter.next(&filename)) { +#if 0 + if (strcmp(filename.c_str(), "tabl_androidpolice.skp")) { + continue; + } +#endif + SkString path; + make_filepath(&path, pictDir, filename); + SkFILEStream stream(path.c_str()); + if (!stream.isValid()) { + continue; + } + SkPicture* pic = SkNEW_ARGS(SkPicture, (&stream)); + int width = pic->width(); + int height = pic->height(); + SkBitmap bitmap; + bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); + bitmap.allocPixels(); + SkCanvas canvas(bitmap); + filename.remove(filename.size() - 3, 3); + filename.append("png"); + for (int i = 0; i < 2; ++i) { + bool useOp = i ? true : false; + canvas.setAllowSimplifyClip(useOp); + pic->draw(&canvas); + SkString outFile; + make_filepath(&outFile, useOp ? outSkpClipDir : outOldClipDir, filename); + SkImageEncoder::EncodeFile(outFile.c_str(), bitmap, SkImageEncoder::kPNG_Type, 100); + } + SkDELETE(pic); + reporter->bumpTestCount(); + } +} + +#include "TestClassDef.h" +DEFINE_TESTCLASS_SHORT(PathOpsSkpClipTest) |