Fix leak in PictureTest.cpp

TBR=schenney@chromium.org

BUG=skia:

Review URL: https://codereview.chromium.org/1210053008
This commit is contained in:
mtklein 2015-07-08 08:26:39 -07:00 committed by Commit bot
parent 2cff176fa2
commit eedc3342db

View File

@ -993,7 +993,8 @@ static void test_cull_rect_reset(skiatest::Reporter* reporter) {
SkPaint paint;
canvas->drawRect(bounds, paint);
canvas->drawRect(bounds, paint);
const SkBigPicture* picture = recorder.endRecordingAsPicture(bounds)->asSkBigPicture();
SkAutoTUnref<const SkPicture> p(recorder.endRecordingAsPicture(bounds));
const SkBigPicture* picture = p->asSkBigPicture();
REPORTER_ASSERT(reporter, picture);
SkRect finalCullRect = picture->cullRect();