From 3729469d6a12266037b697c2192768545e097ab0 Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 2 Dec 2014 10:08:11 -0800 Subject: Change clear() to respect the clip patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1) BUG=skia: Review URL: https://codereview.chromium.org/772533004 --- tests/RecordDrawTest.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'tests/RecordDrawTest.cpp') diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp index 48981ef0a2..30be24c28a 100644 --- a/tests/RecordDrawTest.cpp +++ b/tests/RecordDrawTest.cpp @@ -191,7 +191,7 @@ DEF_TEST(RecordDraw_PartialStartStop, r) { SkRecord rerecord; SkRecorder canvas(&rerecord, kWidth, kHeight); - SkRecordPartialDraw(record, &canvas, NULL, 0, r1, 1, 2, SkMatrix::I()); // replay just drawRect of r2 + SkRecordPartialDraw(record, &canvas, NULL, 0, 1, 2, SkMatrix::I()); // replay just drawRect of r2 REPORTER_ASSERT(r, 3 == rerecord.count()); assert_type (r, rerecord, 0); @@ -202,30 +202,6 @@ DEF_TEST(RecordDraw_PartialStartStop, r) { REPORTER_ASSERT(r, drawRect->rect == r2); } -// Check that clears are converted to drawRects -DEF_TEST(RecordDraw_PartialClear, r) { - static const int kWidth = 10, kHeight = 10; - - SkRect rect = { 0, 0, kWidth, kHeight }; - - SkRecord record; - SkRecorder recorder(&record, kWidth, kHeight); - recorder.clear(SK_ColorRED); - - SkRecord rerecord; - SkRecorder canvas(&rerecord, kWidth, kHeight); - SkRecordPartialDraw(record, &canvas, NULL, 0, rect, 0, 1, SkMatrix::I()); // replay just the clear - - REPORTER_ASSERT(r, 3 == rerecord.count()); - assert_type (r, rerecord, 0); - assert_type(r, rerecord, 1); - assert_type (r, rerecord, 2); - - const SkRecords::DrawRect* drawRect = assert_type(r, rerecord, 1); - REPORTER_ASSERT(r, drawRect->rect == rect); - REPORTER_ASSERT(r, drawRect->paint.getColor() == SK_ColorRED); -} - // A regression test for crbug.com/415468 and skbug.com/2957. // // This also now serves as a regression test for crbug.com/418417. We used to adjust the -- cgit v1.2.3