| Index: tests/PictureTest.cpp
|
| diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
|
| index 7a8c8fa9e3e097fe681fba4964a530f848ab007c..e75f456a9fb6c4a6d0c8d98b4aa50fbae7688b68 100644
|
| --- a/tests/PictureTest.cpp
|
| +++ b/tests/PictureTest.cpp
|
| @@ -322,7 +322,7 @@ static SkPicture* record_bitmaps(const SkBitmap bm[],
|
| SkRect clipRect = SkRect::MakeXYWH(pos[i].fX, pos[i].fY,
|
| SkIntToScalar(bm[i].width()),
|
| SkIntToScalar(bm[i].height()));
|
| - canvas->clipRect(clipRect, SkRegion::kIntersect_Op);
|
| + canvas->clipRect(clipRect);
|
| proc(canvas, bm[i], bm[count+i], pos[i], &analytic[i]);
|
| canvas->restore();
|
| }
|
| @@ -1220,7 +1220,7 @@ static void create_imbalance(SkCanvas* canvas) {
|
| SkRect clipRect = SkRect::MakeWH(2, 2);
|
| SkRect drawRect = SkRect::MakeWH(10, 10);
|
| canvas->save();
|
| - canvas->clipRect(clipRect, SkRegion::kReplace_Op);
|
| + canvas->legacyClipRect(clipRect, SkRegion::kReplace_Op);
|
| canvas->translate(1.0f, 1.0f);
|
| SkPaint p;
|
| p.setColor(SK_ColorGREEN);
|
| @@ -1531,7 +1531,7 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) {
|
| // Testing conservative-raster-clip that is enabled by PictureRecord
|
| {
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
| - canvas->clipPath(invPath, SkRegion::kIntersect_Op);
|
| + canvas->clipPath(invPath);
|
| bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
|
| REPORTER_ASSERT(reporter, true == nonEmpty);
|
| REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
|
| @@ -1541,8 +1541,8 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) {
|
| }
|
| {
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
| - canvas->clipPath(path, SkRegion::kIntersect_Op);
|
| - canvas->clipPath(invPath, SkRegion::kIntersect_Op);
|
| + canvas->clipPath(path);
|
| + canvas->clipPath(invPath);
|
| bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
|
| REPORTER_ASSERT(reporter, true == nonEmpty);
|
| REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
|
| @@ -1552,8 +1552,8 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) {
|
| }
|
| {
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
| - canvas->clipPath(path, SkRegion::kIntersect_Op);
|
| - canvas->clipPath(invPath, SkRegion::kUnion_Op);
|
| + canvas->clipPath(path);
|
| + canvas->legacyClipPath(invPath, SkRegion::kUnion_Op);
|
| bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
|
| REPORTER_ASSERT(reporter, true == nonEmpty);
|
| REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
|
| @@ -1563,7 +1563,7 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) {
|
| }
|
| {
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
| - canvas->clipPath(path, SkRegion::kDifference_Op);
|
| + canvas->clipPath(path, kDifference_SkClipOp);
|
| bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
|
| REPORTER_ASSERT(reporter, true == nonEmpty);
|
| REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
|
| @@ -1573,7 +1573,7 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) {
|
| }
|
| {
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
| - canvas->clipPath(path, SkRegion::kReverseDifference_Op);
|
| + canvas->legacyClipPath(path, SkRegion::kReverseDifference_Op);
|
| bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
|
| // True clip is actually empty in this case, but the best
|
| // determination we can make using only bounds as input is that the
|
| @@ -1586,8 +1586,8 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) {
|
| }
|
| {
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
| - canvas->clipPath(path, SkRegion::kIntersect_Op);
|
| - canvas->clipPath(path2, SkRegion::kXOR_Op);
|
| + canvas->clipPath(path);
|
| + canvas->legacyClipPath(path2, SkRegion::kXOR_Op);
|
| bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
|
| REPORTER_ASSERT(reporter, true == nonEmpty);
|
| REPORTER_ASSERT(reporter, 6 == clipBounds.fLeft);
|
| @@ -1645,9 +1645,9 @@ static void test_clip_expansion(skiatest::Reporter* reporter) {
|
| SkPictureRecorder recorder;
|
| SkCanvas* canvas = recorder.beginRecording(10, 10);
|
|
|
| - canvas->clipRect(SkRect::MakeEmpty(), SkRegion::kReplace_Op);
|
| + canvas->legacyClipRect(SkRect::MakeEmpty(), SkRegion::kReplace_Op);
|
| // The following expanding clip should not be skipped.
|
| - canvas->clipRect(SkRect::MakeXYWH(4, 4, 3, 3), SkRegion::kUnion_Op);
|
| + canvas->legacyClipRect(SkRect::MakeXYWH(4, 4, 3, 3), SkRegion::kUnion_Op);
|
| // Draw something so the optimizer doesn't just fold the world.
|
| SkPaint p;
|
| p.setColor(SK_ColorBLUE);
|
|
|