From ab8657722c7a6676b67b0820210b288ba84a14d9 Mon Sep 17 00:00:00 2001 From: reed Date: Thu, 21 May 2015 06:29:05 -0700 Subject: add assert that the lock-count on pixelref is balanced BUG=skia: TBR= Review URL: https://codereview.chromium.org/1147153004 --- tests/CachedDecodingPixelRefTest.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/CachedDecodingPixelRefTest.cpp') diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp index 670d849436..66e5273625 100644 --- a/tests/CachedDecodingPixelRefTest.cpp +++ b/tests/CachedDecodingPixelRefTest.cpp @@ -262,11 +262,13 @@ static void check_pixelref(TestImageGenerator::TestType type, // new/lock/delete is an odd pattern for a pixelref, but it needs to not assert static void test_newlockdelete(skiatest::Reporter* reporter) { +#ifdef SK_SUPPORT_LEGACY_UNBALANCED_PIXELREF_LOCKCOUNT SkBitmap bm; SkImageGenerator* ig = new TestImageGenerator( TestImageGenerator::kSucceedGetPixels_TestType, reporter); SkInstallDiscardablePixelRef(ig, &bm); bm.pixelRef()->lockPixels(); +#endif } /** -- cgit v1.2.3