aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkYUVPlanesCache.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-02-24 13:54:23 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-24 13:54:23 -0800
commit7eeba2587760a0802fd2b90765b4fd0e5e895375 (patch)
treedad9caa7dde038c52728034710c3d6d4926bfff2 /src/core/SkYUVPlanesCache.cpp
parent4b583ac54b92ad6e7685bdfa2b68e7dd11ba0d28 (diff)
Notify resource caches when pixelref genID goes stale
patch from issue 954443002 at patchset 40001 (http://crrev.com/954443002#ps40001) BUG=skia: Review URL: https://codereview.chromium.org/950363002
Diffstat (limited to 'src/core/SkYUVPlanesCache.cpp')
-rw-r--r--src/core/SkYUVPlanesCache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkYUVPlanesCache.cpp b/src/core/SkYUVPlanesCache.cpp
index 69885fe46a..5ef89b6c19 100644
--- a/src/core/SkYUVPlanesCache.cpp
+++ b/src/core/SkYUVPlanesCache.cpp
@@ -5,8 +5,9 @@
* found in the LICENSE file.
*/
-#include "SkYUVPlanesCache.h"
+#include "SkBitmapCache.h"
#include "SkResourceCache.h"
+#include "SkYUVPlanesCache.h"
#define CHECK_LOCAL(localCache, localName, globalName, ...) \
((localCache) ? localCache->localName(__VA_ARGS__) : SkResourceCache::globalName(__VA_ARGS__))
@@ -23,7 +24,8 @@ struct YUVPlanesKey : public SkResourceCache::Key {
YUVPlanesKey(uint32_t genID)
: fGenID(genID)
{
- this->init(&gYUVPlanesKeyNamespaceLabel, sizeof(genID));
+ this->init(&gYUVPlanesKeyNamespaceLabel, SkMakeResourceCacheSharedIDForBitmap(genID),
+ sizeof(genID));
}
uint32_t fGenID;