aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RecordDrawTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-12-04 07:50:14 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-04 07:50:14 -0800
commit8eddfb50c0c9e4bcba6384a2ce39852b5fb5becb (patch)
treefee1ed25b223ba3e5cd458e351a9899e7179222c /tests/RecordDrawTest.cpp
parent60f3c657cc0235650b630be78105fc47d37385e7 (diff)
Change clear() to respect the clip
Diffstat (limited to 'tests/RecordDrawTest.cpp')
-rw-r--r--tests/RecordDrawTest.cpp26
1 files changed, 1 insertions, 25 deletions
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<SkRecords::Save> (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<SkRecords::Save> (r, rerecord, 0);
- assert_type<SkRecords::DrawRect>(r, rerecord, 1);
- assert_type<SkRecords::Restore> (r, rerecord, 2);
-
- const SkRecords::DrawRect* drawRect = assert_type<SkRecords::DrawRect>(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