From 83787d0ff0a2b2f839a4a3ce6dadd033f83fe643 Mon Sep 17 00:00:00 2001 From: reed Date: Wed, 25 Feb 2015 07:17:11 -0800 Subject: only notify bitmaps that have been added to the cache old code: - calls=2677 hit-rate=3.51139% new code: - calls=94 hit-rate=97.8723% BUG=skia: Review URL: https://codereview.chromium.org/960563002 --- src/lazy/SkCachingPixelRef.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lazy') diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp index 570fc6fbd7..dc53a5d6c7 100644 --- a/src/lazy/SkCachingPixelRef.cpp +++ b/src/lazy/SkCachingPixelRef.cpp @@ -63,8 +63,7 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) { return false; } fLockedBitmap.setImmutable(); - SkBitmapCache::Add( - this->getGenerationID(), info.bounds(), fLockedBitmap); + SkBitmapCache::Add(this, info.bounds(), fLockedBitmap); } // Now bitmap should contain a concrete PixelRef of the decoded image. -- cgit v1.2.3