Chromium Code Reviews| Index: src/lazy/SkCachingPixelRef.cpp |
| diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp |
| index 56431880c9f2dc2225f14176e035439d80e8f104..ff4aaea93f54b6f3c257cabff9f25a85ce2f0ba0 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,7 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) { |
| } |
| const SkImageInfo& info = this->info(); |
| - if (!SkBitmapCache::Find(this->getGenerationID(), info.fWidth, info.fHeight, &fLockedBitmap)) { |
| + if (!SkBitmapCache::Find(this->getGenerationID(), SkIRect::MakeWH(info.fWidth, info.fHeight), &fLockedBitmap)) { |
|
reed1
2014/09/03 18:48:06
nit: 100col max
Rémi Piotaix
2014/09/03 18:55:27
Done.
|
| // Cache has been purged, must re-decode. |
| if (!fLockedBitmap.allocPixels(info, fRowBytes)) { |
| fErrorInDecoding = true; |
| @@ -55,7 +56,7 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) { |
| return false; |
| } |
| fLockedBitmap.setImmutable(); |
| - SkBitmapCache::Add(this->getGenerationID(), info.fWidth, info.fHeight, fLockedBitmap); |
| + SkBitmapCache::Add(this->getGenerationID(), SkIRect::MakeWH(info.fWidth, info.fHeight), fLockedBitmap); |
|
reed1
2014/09/03 18:48:06
100col
Rémi Piotaix
2014/09/03 18:55:27
Done.
|
| } |
| // Now bitmap should contain a concrete PixelRef of the decoded image. |