aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-02-25 07:17:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-25 07:17:11 -0800
commit83787d0ff0a2b2f839a4a3ce6dadd033f83fe643 (patch)
treeabc0791b564824241daf23640ba04f4513bbb5b6 /src/lazy
parent8673765ab59beec47d0ec8d057ff218e550e658f (diff)
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
Diffstat (limited to 'src/lazy')
-rw-r--r--src/lazy/SkCachingPixelRef.cpp3
1 files changed, 1 insertions, 2 deletions
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.