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

Unified Diff: tests/CachedDecodingPixelRefTest.cpp

Issue 1147153004: add assert that the lock-count on pixelref is balanced (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« gyp/skia_for_android_framework_defines.gypi ('K') | « src/core/SkPixelRef.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CachedDecodingPixelRefTest.cpp
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 670d849436f5a11a17adbbb0cbbc2051f11139cf..66e5273625df385d772cc33e666a7fbff6df5a1e 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -262,11 +262,13 @@ static void check_pixelref(TestImageGenerator::TestType type,
robertphillips 2015/05/21 13:32:04 // TODO: remove this test ?
// 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
}
/**
« gyp/skia_for_android_framework_defines.gypi ('K') | « src/core/SkPixelRef.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698