Index: tests/PictureTest.cpp |
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp |
index 447ce4eb4d950d041bb5c7c8aceab27d75a51d5e..b90cc030d78c228d0a57cfb1f4c5c4c7f562b8bc 100644 |
--- a/tests/PictureTest.cpp |
+++ b/tests/PictureTest.cpp |
@@ -13,6 +13,8 @@ |
#include "SkData.h" |
#include "SkDecodingImageGenerator.h" |
#include "SkError.h" |
+#include "SkImageEncoder.h" |
+#include "SkImageGenerator.h" |
#include "SkPaint.h" |
#include "SkPicture.h" |
#include "SkPictureUtils.h" |
@@ -338,8 +340,6 @@ static void test_bad_bitmap() { |
} |
#endif |
-#include "SkImageEncoder.h" |
- |
static SkData* encode_bitmap_to_data(size_t* offset, const SkBitmap& bm) { |
*offset = 0; |
return SkImageEncoder::EncodeData(bm, SkImageEncoder::kPNG_Type, 100); |
@@ -381,7 +381,8 @@ static void test_bitmap_with_encoded_data(skiatest::Reporter* reporter) { |
SkAutoDataUnref data(wStream.copyToData()); |
SkBitmap bm; |
- bool installSuccess = SkDecodingImageGenerator::Install(data, &bm); |
+ bool installSuccess = SkInstallDiscardablePixelRef( |
+ SkDecodingImageGenerator::Create(data, SkDecodingImageGenerator::Options()), &bm, NULL); |
REPORTER_ASSERT(reporter, installSuccess); |
// Write both bitmaps to pictures, and ensure that the resulting data streams are the same. |