From 171e5b73a862418f4acd61faf8cecfbc8f58694c Mon Sep 17 00:00:00 2001 From: fmalita Date: Wed, 22 Oct 2014 11:20:40 -0700 Subject: SkResourceCache::Key namespace support. Add a unique-per-subclass namespace tag to make Keys from different domains comparable. Also drop the SkPictureShader cache and convert to using the global resource cache instead. R=reed@google.com,mtklein@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/668223002 --- tests/ImageCacheTest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/ImageCacheTest.cpp') diff --git a/tests/ImageCacheTest.cpp b/tests/ImageCacheTest.cpp index 9f893bb24c..eaf3f2811f 100644 --- a/tests/ImageCacheTest.cpp +++ b/tests/ImageCacheTest.cpp @@ -12,11 +12,10 @@ namespace { static void* gGlobalAddress; struct TestingKey : public SkResourceCache::Key { - void* fPtr; intptr_t fValue; - TestingKey(intptr_t value) : fPtr(&gGlobalAddress), fValue(value) { - this->init(sizeof(fPtr) + sizeof(fValue)); + TestingKey(intptr_t value) : fValue(value) { + this->init(&gGlobalAddress, sizeof(fValue)); } }; struct TestingRec : public SkResourceCache::Rec { -- cgit v1.2.3