aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-11-18 11:08:05 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-18 11:08:05 -0800
commit6be2aa9a251bf6022570a03140f956655b3ef1da (patch)
tree52ccd2b4fd1fde02617f08ee03d30faee917c38f /tests
parentad3a8846f8963e03faa6de647502e1c553161ecb (diff)
wip for drawables
Idea: 1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list. 2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc) 3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture. Review URL: https://codereview.chromium.org/727363003
Diffstat (limited to 'tests')
-rw-r--r--tests/RecordDrawTest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp
index 2346655330..e5dd9fe654 100644
--- a/tests/RecordDrawTest.cpp
+++ b/tests/RecordDrawTest.cpp
@@ -41,7 +41,7 @@ DEF_TEST(RecordDraw_Abort, r) {
SkRecorder canvas(&rerecord, W, H);
JustOneDraw callback;
- SkRecordDraw(record, &canvas, NULL/*bbh*/, &callback);
+ SkRecordDraw(record, &canvas, NULL, 0, NULL/*bbh*/, &callback);
REPORTER_ASSERT(r, 3 == rerecord.count());
assert_type<SkRecords::Save> (r, rerecord, 0);
@@ -56,7 +56,7 @@ DEF_TEST(RecordDraw_Unbalanced, r) {
SkRecord rerecord;
SkRecorder canvas(&rerecord, W, H);
- SkRecordDraw(record, &canvas, NULL/*bbh*/, NULL/*callback*/);
+ SkRecordDraw(record, &canvas, NULL, 0, NULL/*bbh*/, NULL/*callback*/);
REPORTER_ASSERT(r, 4 == rerecord.count());
assert_type<SkRecords::Save> (r, rerecord, 0);
@@ -80,7 +80,7 @@ DEF_TEST(RecordDraw_SetMatrixClobber, r) {
translate.setTranslate(20, 20);
translateCanvas.setMatrix(translate);
- SkRecordDraw(scaleRecord, &translateCanvas, NULL/*bbh*/, NULL/*callback*/);
+ SkRecordDraw(scaleRecord, &translateCanvas, NULL, 0, NULL/*bbh*/, NULL/*callback*/);
REPORTER_ASSERT(r, 4 == translateRecord.count());
assert_type<SkRecords::SetMatrix>(r, translateRecord, 0);
assert_type<SkRecords::Save> (r, translateRecord, 1);
@@ -190,7 +190,7 @@ DEF_TEST(RecordDraw_PartialStartStop, r) {
SkRecord rerecord;
SkRecorder canvas(&rerecord, kWidth, kHeight);
- SkRecordPartialDraw(record, &canvas, r1, 1, 2, SkMatrix::I()); // replay just drawRect of r2
+ SkRecordPartialDraw(record, &canvas, NULL, 0, r1, 1, 2, SkMatrix::I()); // replay just drawRect of r2
REPORTER_ASSERT(r, 3 == rerecord.count());
assert_type<SkRecords::Save> (r, rerecord, 0);
@@ -213,7 +213,7 @@ DEF_TEST(RecordDraw_PartialClear, r) {
SkRecord rerecord;
SkRecorder canvas(&rerecord, kWidth, kHeight);
- SkRecordPartialDraw(record, &canvas, rect, 0, 1, SkMatrix::I()); // replay just the clear
+ 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);
@@ -319,7 +319,7 @@ DEF_TEST(RecordDraw_drawImage, r){
SkRecord record;
SkRecorder recorder(&record, 10, 10);
recorder.drawImage(image, 0, 0);
- SkRecordDraw(record, &canvas, 0, 0);
+ SkRecordDraw(record, &canvas, NULL, 0, NULL, 0);
}
REPORTER_ASSERT(r, canvas.fDrawImageCalled);
canvas.resetTestValues();
@@ -328,7 +328,7 @@ DEF_TEST(RecordDraw_drawImage, r){
SkRecord record;
SkRecorder recorder(&record, 10, 10);
recorder.drawImageRect(image, 0, SkRect::MakeWH(10, 10));
- SkRecordDraw(record, &canvas, 0, 0);
+ SkRecordDraw(record, &canvas, NULL, 0, NULL, 0);
}
REPORTER_ASSERT(r, canvas.fDrawImageRectCalled);