diff options
author | reed <reed@google.com> | 2015-04-30 13:09:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-30 13:09:25 -0700 |
commit | 1c2c441fede0ae9573afc098017011e3439624a9 (patch) | |
tree | 088df00ee48e5e6f6d0763c2962f25e61b25a80f /tests/RecorderTest.cpp | |
parent | 4f7ec55f7128e971318adc11f07fc485c4d50bc5 (diff) |
add heuristic to pour small pictures into recordings, rather than ref'ing
BUG=skia:
Review URL: https://codereview.chromium.org/1118693003
Diffstat (limited to 'tests/RecorderTest.cpp')
-rw-r--r-- | tests/RecorderTest.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/RecorderTest.cpp b/tests/RecorderTest.cpp index 4fac1af58c..e67de58acb 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; |