From 11f2b444500d552031fcae0b381a0770600400fd Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Tue, 4 Jun 2013 07:00:53 +0000 Subject: [PATCH] Sanitizing source files in Housekeeper-Nightly git-svn-id: http://skia.googlecode.com/svn/trunk@9423 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/megalooper.cpp | 24 ++++++++++++------------ include/core/SkData.h | 2 +- src/ports/SkOSFile_posix.cpp | 2 +- tests/DataRefTest.cpp | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gm/megalooper.cpp b/gm/megalooper.cpp index 8f5932caf..832b0a874 100644 --- a/gm/megalooper.cpp +++ b/gm/megalooper.cpp @@ -83,8 +83,8 @@ private: SkRect innerClip = { -kHalfSquareSize, -kHalfSquareSize, kHalfSquareSize, kHalfSquareSize }; innerClip.offset(x, y); - SkRect outerClip = { - -kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize, + SkRect outerClip = { + -kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize, kHalfOuterClipSize+kHalfSquareSize, kHalfOuterClipSize+kHalfSquareSize }; outerClip.offset(x, y); @@ -124,7 +124,7 @@ private: // while a difference clip stays at the location of the original rect. // Each blurred rect is drawn with a draw looper where the original (non- // blurred rect) is offset to reside outside of the large outer clip (so - // it never appears) but the offset in the draw looper is used to translate + // it never appears) but the offset in the draw looper is used to translate // the blurred version back into the clip. void draw4x1(SkCanvas* canvas, SkScalar x, SkScalar y) { @@ -134,9 +134,9 @@ private: loopPaint.setLooper(create1Looper(-kOffsetToOutsideClip, 0, gColors[i])); loopPaint.setAntiAlias(true); - SkRect outerClip = { - -kHalfOuterClipSize, -kHalfOuterClipSize, - kHalfOuterClipSize, kHalfOuterClipSize + SkRect outerClip = { + -kHalfOuterClipSize, -kHalfOuterClipSize, + kHalfOuterClipSize, kHalfOuterClipSize }; outerClip.offset(x, y); // center it on the blurred rect @@ -160,7 +160,7 @@ private: } } - // Create a 1-tier drawlooper + // Create a 1-tier drawlooper SkLayerDrawLooper* create1Looper(SkScalar xOff, SkScalar yOff, SkColor color) { SkLayerDrawLooper* looper = new SkLayerDrawLooper; SkLayerDrawLooper::LayerInfo info; @@ -186,8 +186,8 @@ private: SkRect rect = { -kHalfSquareSize, -kHalfSquareSize, kHalfSquareSize, kHalfSquareSize }; rect.offset(x, y); - SkRect outerClip = { - -kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize, + SkRect outerClip = { + -kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize, kHalfOuterClipSize+kHalfSquareSize, kHalfOuterClipSize+kHalfSquareSize }; outerClip.offset(x, y); @@ -235,9 +235,9 @@ private: }; const SkPoint MegaLooperGM::gBlurOffsets[4] = { - { kHalfSquareSize, kHalfSquareSize }, - { -kHalfSquareSize, kHalfSquareSize }, - { kHalfSquareSize, -kHalfSquareSize }, + { kHalfSquareSize, kHalfSquareSize }, + { -kHalfSquareSize, kHalfSquareSize }, + { kHalfSquareSize, -kHalfSquareSize }, { -kHalfSquareSize, -kHalfSquareSize } }; diff --git a/include/core/SkData.h b/include/core/SkData.h index 4600429fe..ab7da4774 100644 --- a/include/core/SkData.h +++ b/include/core/SkData.h @@ -107,7 +107,7 @@ public: * Returns NULL on failure. */ static SkData* NewFromFD(int fd); - + /** * Create a new dataref using a subset of the data in the specified * src dataref. diff --git a/src/ports/SkOSFile_posix.cpp b/src/ports/SkOSFile_posix.cpp index 72a1b5933..b7d90795d 100644 --- a/src/ports/SkOSFile_posix.cpp +++ b/src/ports/SkOSFile_posix.cpp @@ -75,6 +75,6 @@ void* sk_fmmap(SkFILE* f, size_t* size) { if (fd < 0) { return NULL; } - + return sk_fdmmap(fd, size); } diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp index d8bd24b2b..9ff7034ca 100644 --- a/tests/DataRefTest.cpp +++ b/tests/DataRefTest.cpp @@ -263,11 +263,11 @@ static void test_files(skiatest::Reporter* reporter) { if (skiatest::Test::GetTmpDir().isEmpty()) { return; } - + const char* tmpDir = skiatest::Test::GetTmpDir().c_str(); SkString path; path.printf("%s%s", tmpDir, "data_test"); - + const char s[] = "abcdefghijklmnopqrstuvwxyz"; { SkFILEWStream writer(path.c_str()); @@ -285,7 +285,7 @@ static void test_files(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, r1.get() != NULL); REPORTER_ASSERT(reporter, r1->size() == 26); REPORTER_ASSERT(reporter, strncmp(static_cast(r1->data()), s, 26) == 0); - + int fd = sk_fileno(file); SkAutoTUnref r2(SkData::NewFromFD(fd)); REPORTER_ASSERT(reporter, r2.get() != NULL);