| Index: tests/PictureTest.cpp
|
| diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
|
| index 77fed2ffe3ecd3de5c2c2c5aab3c38055001f613..a9a097b3089dfef4b1258a3b3b43dc84a283cd0d 100644
|
| --- a/tests/PictureTest.cpp
|
| +++ b/tests/PictureTest.cpp
|
| @@ -1733,7 +1733,8 @@ static void test_bytes_used(skiatest::Reporter* reporter) {
|
| sizeof(SkPicture) + sizeof(SkRecord));
|
|
|
| // Protect against any unintentional bloat.
|
| - REPORTER_ASSERT(reporter, SkPictureUtils::ApproximateBytesUsed(empty.get()) <= 128);
|
| + size_t approxUsed = SkPictureUtils::ApproximateBytesUsed(empty.get());
|
| + REPORTER_ASSERT(reporter, approxUsed <= 136);
|
|
|
| // Sanity check of nested SkPictures.
|
| SkPictureRecorder r2;
|
| @@ -1905,11 +1906,14 @@ DEF_TEST(Picture_BitmapLeak, r) {
|
| REPORTER_ASSERT(r, mut.pixelRef()->unique());
|
| REPORTER_ASSERT(r, immut.pixelRef()->unique());
|
|
|
| - SkPictureRecorder rec;
|
| - SkCanvas* canvas = rec.beginRecording(1920, 1200);
|
| - canvas->drawBitmap(mut, 0, 0);
|
| - canvas->drawBitmap(immut, 800, 600);
|
| - SkAutoTDelete<const SkPicture> pic(rec.endRecording());
|
| + SkAutoTDelete<const SkPicture> pic;
|
| + {
|
| + SkPictureRecorder rec;
|
| + SkCanvas* canvas = rec.beginRecording(1920, 1200);
|
| + canvas->drawBitmap(mut, 0, 0);
|
| + canvas->drawBitmap(immut, 800, 600);
|
| + pic.reset(rec.endRecording());
|
| + }
|
|
|
| // The picture shares the immutable pixels but copies the mutable ones.
|
| REPORTER_ASSERT(r, mut.pixelRef()->unique());
|
|
|