From c83a91f4721739f05f9df51d496d50b5d028b132 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 13 Dec 2013 13:41:14 +0000 Subject: Revert "Revert of https://codereview.chromium.org/112783004/" This reverts commit 3293fe57a7507541e9040eab880dcd82c43881f4. Conflicts: src/core/SkScaledImageCache.cpp BUG= Review URL: https://codereview.chromium.org/108613005 git-svn-id: http://skia.googlecode.com/svn/trunk@12663 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/lazy/SkCachingPixelRef.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lazy/SkCachingPixelRef.cpp') diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp index 667a94931b..b7eaf574aa 100644 --- a/src/lazy/SkCachingPixelRef.cpp +++ b/src/lazy/SkCachingPixelRef.cpp @@ -90,9 +90,7 @@ void* SkCachingPixelRef::onLockPixels(SkColorTable** colorTable) { } void SkCachingPixelRef::onUnlockPixels() { - if (fScaledCacheId != NULL) { - SkScaledImageCache::Unlock( - static_cast(fScaledCacheId)); - fScaledCacheId = NULL; - } + SkASSERT(fScaledCacheId != NULL); + SkScaledImageCache::Unlock( static_cast(fScaledCacheId)); + fScaledCacheId = NULL; } -- cgit v1.2.3