Revert of https://codereview.chromium.org/93703004/
Reason for revert: Test failures

R=scroggo@google.com, djsollen@google.com, reed@google.com, halcanary@google.com
TBR=djsollen@google.com, halcanary@google.com, reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/103753007

git-svn-id: http://skia.googlecode.com/svn/trunk@12747 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index b90cc03..447ce4e 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.