From 7cc49d65fc5788f72458efc8fc4156cde4cca15a Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 14 Aug 2017 10:39:28 -0400 Subject: Record SkCanvas::flush(). We can record multiple frames in an .skp by recording SkCanvas::flush(). This should make SkPictures, SkLiteDL, and .skp files all record flush(). Change-Id: I6cf6e0e4ef993530d9f92fa168a53702ffce7d5e Reviewed-on: https://skia-review.googlesource.com/34081 Reviewed-by: Derek Sollenberger Commit-Queue: Mike Klein --- tests/SkLiteDLTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/SkLiteDLTest.cpp') diff --git a/tests/SkLiteDLTest.cpp b/tests/SkLiteDLTest.cpp index 514464aaf9..d719c0bb76 100644 --- a/tests/SkLiteDLTest.cpp +++ b/tests/SkLiteDLTest.cpp @@ -51,3 +51,14 @@ DEF_TEST(SkLiteRecorder, r) { c->drawRect(SkRect{0,0,9,9}, SkPaint{}); c->restore(); } + +DEF_TEST(SkLiteRecorder_RecordsFlush, r) { + SkLiteDL dl; + + SkLiteRecorder canvas; + canvas.reset(&dl, {0,0,100,100}); + + REPORTER_ASSERT(r, dl.empty()); + canvas.flush(); + REPORTER_ASSERT(r, !dl.empty()); +} -- cgit v1.2.3