Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6344 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
91c2f07990
commit
72b2e6fff3
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user