From 72b2e6fff3f54c6aa80a98eab4c73f02a8cd450d Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Thu, 8 Nov 2012 02:03:56 +0000 Subject: [PATCH] Sanitizing source files in Skia_Periodic_House_Keeping git-svn-id: http://skia.googlecode.com/svn/trunk@6344 2bbb7eff-a529-9590-31e7-b0007b416f81 --- debugger/SkObjectParser.cpp | 2 +- include/core/SkRect.h | 6 +++--- src/gpu/GrClipMaskManager.cpp | 4 ++-- tests/ClipStackTest.cpp | 4 ++-- tests/RegionTest.cpp | 16 ++++++++-------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/debugger/SkObjectParser.cpp b/debugger/SkObjectParser.cpp index 6b5207c..cfb0744 100644 --- a/debugger/SkObjectParser.cpp +++ b/debugger/SkObjectParser.cpp @@ -189,7 +189,7 @@ SkString* SkObjectParser::PointModeToString(SkCanvas::PointMode mode) { SkString* SkObjectParser::RectToString(const SkRect& rect, const char* title) { SkString* mRect = new SkString; - + if (NULL == title) { mRect->append("SkRect: "); } else { diff --git a/include/core/SkRect.h b/include/core/SkRect.h index f5e8c3c..04096f3 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -547,7 +547,7 @@ struct SK_API SkRect { fLeft = newX; fTop = newY; } - + /** Inset the rectangle by (dx,dy). If dx is positive, then the sides are moved inwards, making the rectangle narrower. If dx is negative, then the sides are moved outwards, making the rectangle wider. The same holds @@ -722,8 +722,8 @@ struct SK_API SkRect { dst->set(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop), SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)); } - - + + /** * Swap top/bottom or left/right if there are flipped (i.e. if width() * or height() would have returned a negative value.) This should be called diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 2db006a..893bcb1 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -496,7 +496,7 @@ void GrClipMaskManager::mergeMask(GrTexture* dstMask, drawState->setRenderTarget(dstMask->asRenderTarget()); setup_boolean_blendcoeffs(drawState, op); - + SkMatrix sampleM; sampleM.setIDiv(srcMask->width(), srcMask->height()); drawState->stage(0)->setEffect( @@ -651,7 +651,7 @@ bool GrClipMaskManager::createAlphaClipMask(const GrClipData& clipDataIn, if (!accumClearedToZero) { fGpu->clear(&maskResultBounds, 0x00000000, accum->asRenderTarget()); } - + setup_boolean_blendcoeffs(drawState, op); this->drawClipShape(accum, clip, *devResultBounds); diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp index 0516d9e..9b39d76 100644 --- a/tests/ClipStackTest.cpp +++ b/tests/ClipStackTest.cpp @@ -595,7 +595,7 @@ static void test_iter_rect_merging(skiatest::Reporter* reporter) { stack.clipDevRect(nestedChild, SkRegion::kIntersect_Op, true); stack.save(); SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); - + clip = iter.nextCombined(); REPORTER_ASSERT(reporter, clip->fDoAA && *clip->fRect == nestedChild); @@ -611,7 +611,7 @@ static void test_iter_rect_merging(skiatest::Reporter* reporter) { stack.clipDevRect(nestedParent, SkRegion::kIntersect_Op, true); stack.save(); SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); - + clip = iter.nextCombined(); REPORTER_ASSERT(reporter, !clip->fDoAA && *clip->fRect == nestedChild); diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp index a8ce0e0..5d3946e 100644 --- a/tests/RegionTest.cpp +++ b/tests/RegionTest.cpp @@ -28,7 +28,7 @@ static void test_fromchrome(skiatest::Reporter* reporter) { TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, -1, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(0, -1, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, -1, 3, 3)); - + Union(&r, SkIRect::MakeXYWH(0, 0, 3, 3)); Union(&r, SkIRect::MakeXYWH(10, 0, 3, 3)); Union(&r, SkIRect::MakeXYWH(0, 10, 13, 3)); @@ -36,32 +36,32 @@ static void test_fromchrome(skiatest::Reporter* reporter) { TEST_INTERSECT(r, SkIRect::MakeXYWH(2, -1, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(2, 2, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, 2, 2, 2)); - + TEST_INTERSECT(r, SkIRect::MakeXYWH(9, -1, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(12, -1, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(12, 2, 2, 2)); TEST_INTERSECT(r, SkIRect::MakeXYWH(9, 2, 2, 2)); - + TEST_INTERSECT(r, SkIRect::MakeXYWH(0, -1, 13, 5)); TEST_INTERSECT(r, SkIRect::MakeXYWH(1, -1, 11, 5)); TEST_INTERSECT(r, SkIRect::MakeXYWH(2, -1, 9, 5)); TEST_INTERSECT(r, SkIRect::MakeXYWH(2, -1, 8, 5)); TEST_INTERSECT(r, SkIRect::MakeXYWH(3, -1, 8, 5)); - + TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 1, 13, 1)); TEST_INTERSECT(r, SkIRect::MakeXYWH(1, 1, 11, 1)); TEST_INTERSECT(r, SkIRect::MakeXYWH(2, 1, 9, 1)); TEST_INTERSECT(r, SkIRect::MakeXYWH(2, 1, 8, 1)); TEST_INTERSECT(r, SkIRect::MakeXYWH(3, 1, 8, 1)); - + TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 0, 13, 13)); TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 1, 13, 11)); TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 2, 13, 9)); TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 2, 13, 8)); - - + + // These test SkRegion::contains(Rect) and SkRegion::contains(Region) - + SkRegion container; Union(&container, SkIRect::MakeXYWH(0, 0, 40, 20)); Union(&container, SkIRect::MakeXYWH(30, 20, 10, 20)); -- 2.7.4