Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: tests/BitmapFactoryTest.cpp

Issue 84783002: SkDiscardableMemory::Factory class (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/BitmapFactoryTest.cpp
diff --git a/tests/BitmapFactoryTest.cpp b/tests/BitmapFactoryTest.cpp
index 9f1fa478fda036712d35784be0974c72cb816f5d..99ed54feb46c8f05fb71ac538d78ba2cd15bf4f5 100644
--- a/tests/BitmapFactoryTest.cpp
+++ b/tests/BitmapFactoryTest.cpp
@@ -14,7 +14,6 @@
#include "SkData.h"
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
-#include "SkLazyPixelRef.h"
#include "SkLruImageCache.h"
#include "SkPaint.h"
#include "SkPurgeableImageCache.h"
@@ -114,23 +113,11 @@ static void test_factory(skiatest::Reporter* reporter, SkImageCache* cache, SkDa
} else {
// Lazy decoding
REPORTER_ASSERT(reporter, !bitmapFromFactory->readyToDraw());
- SkLazyPixelRef* lazyRef = static_cast<SkLazyPixelRef*>(pixelRef);
- intptr_t cacheID = lazyRef->getCacheId();
- REPORTER_ASSERT(reporter, cache->getMemoryStatus(cacheID)
- != SkImageCache::kPinned_MemoryStatus);
{
SkAutoLockPixels alp(*bitmapFromFactory.get());
REPORTER_ASSERT(reporter, bitmapFromFactory->readyToDraw());
- cacheID = lazyRef->getCacheId();
- REPORTER_ASSERT(reporter, cache->getMemoryStatus(cacheID)
- == SkImageCache::kPinned_MemoryStatus);
}
REPORTER_ASSERT(reporter, !bitmapFromFactory->readyToDraw());
- REPORTER_ASSERT(reporter, cache->getMemoryStatus(cacheID)
- != SkImageCache::kPinned_MemoryStatus);
- bitmapFromFactory.free();
- REPORTER_ASSERT(reporter, cache->getMemoryStatus(cacheID)
- == SkImageCache::kFreed_MemoryStatus);
}
}

Powered by Google App Engine
This is Rietveld 408576698