diff options
author | Mike Klein <mtklein@chromium.org> | 2017-08-14 10:39:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-14 15:29:05 +0000 |
commit | 7cc49d65fc5788f72458efc8fc4156cde4cca15a (patch) | |
tree | 00ef007c014f88c0949231653cd1b97290e829af /tests/SkLiteDLTest.cpp | |
parent | 0db0779199ee74074c39c6ea4e870ea9b231622b (diff) |
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 <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SkLiteDLTest.cpp')
-rw-r--r-- | tests/SkLiteDLTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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()); +} |