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

Unified Diff: tests/PictureTest.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 | « tests/ImageDecodingTest.cpp ('k') | tools/LazyDecodeBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tools/LazyDecodeBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698