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

Unified Diff: tests/CachedDecodingPixelRefTest.cpp

Issue 834633006: add ImageGenerator::NewFromData to porting layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add helper for SkInstallDiscardablePixelRef(SkData*, ...) Created 5 years, 11 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
Index: tests/CachedDecodingPixelRefTest.cpp
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index b3eb5327d91291fe001aab9cef1e09889f0fdfa1..48100e714b3337fc33bd5d9c94b62e14f4e596de 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -9,7 +9,6 @@
#include "SkCachingPixelRef.h"
#include "SkCanvas.h"
#include "SkData.h"
-#include "SkDecodingImageGenerator.h"
#include "SkDiscardableMemoryPool.h"
#include "SkImageDecoder.h"
#include "SkImageGeneratorPriv.h"
@@ -143,15 +142,11 @@ static void test_three_encodings(skiatest::Reporter* reporter,
////////////////////////////////////////////////////////////////////////////////
static bool install_skCachingPixelRef(SkData* encoded, SkBitmap* dst) {
- return SkCachingPixelRef::Install(
- SkDecodingImageGenerator::Create(
- encoded, SkDecodingImageGenerator::Options()), dst);
+ return SkCachingPixelRef::Install(SkImageGenerator::NewFromData(encoded), dst);
}
static bool install_skDiscardablePixelRef(SkData* encoded, SkBitmap* dst) {
// Use system-default discardable memory.
- return SkInstallDiscardablePixelRef(
- SkDecodingImageGenerator::Create(
- encoded, SkDecodingImageGenerator::Options()), dst);
+ return SkInstallDiscardablePixelRef(encoded, dst);
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698