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

Unified Diff: tests/PictureTest.cpp

Issue 103753007: Revert of Change SkDecodingImageGenerator API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 b90cc030d78c228d0a57cfb1f4c5c4c7f562b8bc..447ce4eb4d950d041bb5c7c8aceab27d75a51d5e 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -13,8 +13,6 @@
#include "SkData.h"
#include "SkDecodingImageGenerator.h"
#include "SkError.h"
-#include "SkImageEncoder.h"
-#include "SkImageGenerator.h"
#include "SkPaint.h"
#include "SkPicture.h"
#include "SkPictureUtils.h"
@@ -340,6 +338,8 @@
}
#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,8 +381,7 @@
SkAutoDataUnref data(wStream.copyToData());
SkBitmap bm;
- bool installSuccess = SkInstallDiscardablePixelRef(
- SkDecodingImageGenerator::Create(data, SkDecodingImageGenerator::Options()), &bm, NULL);
+ bool installSuccess = SkDecodingImageGenerator::Install(data, &bm);
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