aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Gpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/image/SkImage_Gpu.cpp')
-rw-r--r--src/image/SkImage_Gpu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 66fc813d45..b4ec0649f2 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -63,7 +63,8 @@ SkImageInfo SkImage_Gpu::onImageInfo() const {
}
bool SkImage_Gpu::getROPixels(SkBitmap* dst, SkColorSpace* dstColorSpace, CachingHint chint) const {
- if (SkBitmapCache::Find(this->uniqueID(), dst)) {
+ const auto desc = SkBitmapCacheDesc::Make(this);
+ if (SkBitmapCache::Find(desc, dst)) {
SkASSERT(dst->getGenerationID() == this->uniqueID());
SkASSERT(dst->isImmutable());
SkASSERT(dst->getPixels());
@@ -86,7 +87,7 @@ bool SkImage_Gpu::getROPixels(SkBitmap* dst, SkColorSpace* dstColorSpace, Cachin
dst->pixelRef()->setImmutableWithID(this->uniqueID());
if (kAllow_CachingHint == chint) {
- SkBitmapCache::Add(this->uniqueID(), *dst);
+ SkBitmapCache::Add(desc, *dst);
fAddedRasterVersionToCache.store(true);
}
return true;