diff options
author | piotaixr <piotaixr@chromium.org> | 2014-09-03 12:34:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-03 12:34:57 -0700 |
commit | 91cab830c81025e0af800b528bed582ea6e4d3d7 (patch) | |
tree | a1defe37c0ed4dd583f237afba155031bdf0ae09 /src/lazy | |
parent | e5ea500d4714a7d84de2bf913e81be3b65d2de68 (diff) |
Remove SkBitmapCache::Find/Add(_,width,height,_)
in favor of the versions having a SkIRect as input parameter
BUG=skia:2909
R=reed@google.com, junov@chromium.org
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/539643002
Diffstat (limited to 'src/lazy')
-rw-r--r-- | src/lazy/SkCachingPixelRef.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp index aeaa412508..1459567e0b 100644 --- a/src/lazy/SkCachingPixelRef.cpp +++ b/src/lazy/SkCachingPixelRef.cpp @@ -7,6 +7,7 @@ #include "SkCachingPixelRef.h" #include "SkBitmapCache.h" +#include "SkRect.h" bool SkCachingPixelRef::Install(SkImageGenerator* generator, SkBitmap* dst) { @@ -44,7 +45,9 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) { } const SkImageInfo& info = this->info(); - if (!SkBitmapCache::Find(this->getGenerationID(), info.width(), info.height(), &fLockedBitmap)) { + if (!SkBitmapCache::Find(this->getGenerationID(), + SkIRect::MakeWH(info.width(), info.height()), + &fLockedBitmap)) { // Cache has been purged, must re-decode. if (!fLockedBitmap.tryAllocPixels(info, fRowBytes)) { fErrorInDecoding = true; @@ -55,7 +58,9 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) { return false; } fLockedBitmap.setImmutable(); - SkBitmapCache::Add(this->getGenerationID(), info.width(), info.height(), fLockedBitmap); + SkBitmapCache::Add(this->getGenerationID(), + SkIRect::MakeWH(info.width(), info.height()), + fLockedBitmap); } // Now bitmap should contain a concrete PixelRef of the decoded image. |