Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: tests/RecorderTest.cpp

Issue 1118693003: add heuristic to pour small pictures into recordings, rather than ref'ing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move check into SkCanvas non-virtual Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecorderTest.cpp
diff --git a/tests/RecorderTest.cpp b/tests/RecorderTest.cpp
index 4fac1af58c274ed994619503c4a97f766972897d..e67de58acbd73a15964ae03cad27c4d6ddc5eb2f 100644
--- a/tests/RecorderTest.cpp
+++ b/tests/RecorderTest.cpp
@@ -89,28 +89,6 @@ DEF_TEST(Recorder_RefLeaking, r) {
REPORTER_ASSERT(r, paint.getShader()->unique());
}
-DEF_TEST(Recorder_RefPictures, r) {
- SkAutoTUnref<SkPicture> pic;
-
- {
- SkPictureRecorder pr;
- SkCanvas* canvas = pr.beginRecording(100, 100);
- canvas->drawColor(SK_ColorRED);
- pic.reset(pr.endRecording());
- }
- REPORTER_ASSERT(r, pic->unique());
-
- {
- SkRecord record;
- SkRecorder recorder(&record, 100, 100);
- recorder.drawPicture(pic);
- // the recorder should now also be an owner
- REPORTER_ASSERT(r, !pic->unique());
- }
- // the recorder destructor should have released us (back to unique)
- REPORTER_ASSERT(r, pic->unique());
-}
-
DEF_TEST(Recorder_drawImage_takeReference, reporter) {
SkAutoTUnref<SkImage> image;
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698