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

Unified Diff: tests/CachedDecodingPixelRefTest.cpp

Issue 93703004: Change SkDecodingImageGenerator API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebased Created 6 years, 12 months 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
« no previous file with comments | « src/lazy/SkDiscardablePixelRef.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CachedDecodingPixelRefTest.cpp
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 04eddd907075193a1323a7768f9b0c0bf039a524..434724d0cf9532e4e83b805aa04ddd60d062cc9c 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -146,11 +146,14 @@ static void test_three_encodings(skiatest::Reporter* reporter,
////////////////////////////////////////////////////////////////////////////////
static bool install_skCachingPixelRef(SkData* encoded, SkBitmap* dst) {
return SkCachingPixelRef::Install(
- SkNEW_ARGS(SkDecodingImageGenerator, (encoded)), dst);
+ SkDecodingImageGenerator::Create(
+ encoded, SkDecodingImageGenerator::Options()), dst);
}
static bool install_skDiscardablePixelRef(SkData* encoded, SkBitmap* dst) {
// Use system-default discardable memory.
- return SkDecodingImageGenerator::Install(encoded, dst, NULL);
+ return SkInstallDiscardablePixelRef(
+ SkDecodingImageGenerator::Create(
+ encoded, SkDecodingImageGenerator::Options()), dst, NULL);
}
////////////////////////////////////////////////////////////////////////////////
@@ -213,10 +216,12 @@ public:
}
return true;
}
+
private:
const TestType fType;
skiatest::Reporter* const fReporter;
};
+
void CheckTestImageGeneratorBitmap(skiatest::Reporter* reporter,
const SkBitmap& bm) {
REPORTER_ASSERT(reporter, TestImageGenerator::Width() == bm.width());
« no previous file with comments | « src/lazy/SkDiscardablePixelRef.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698