Index: tools/render_pdfs_main.cpp |
diff --git a/tools/render_pdfs_main.cpp b/tools/render_pdfs_main.cpp |
index 1821548aa34bc901d5c8a13c11acca5322cfc949..f4435021c3b7c41690836999045cc5666170fdc4 100644 |
--- a/tools/render_pdfs_main.cpp |
+++ b/tools/render_pdfs_main.cpp |
@@ -9,7 +9,6 @@ |
#include "SkDevice.h" |
#include "SkForceLinking.h" |
#include "SkGraphics.h" |
-#include "SkImageDecoder.h" |
#include "SkImageEncoder.h" |
#include "SkOSFile.h" |
#include "SkPicture.h" |
@@ -169,11 +168,9 @@ static bool render_pdf(const SkString& inputPath, const SkString& outputDir, |
return false; |
} |
- bool success = false; |
- SkAutoTUnref<SkPicture> |
- picture(SkNEW_ARGS(SkPicture, (&inputStream, &success, &SkImageDecoder::DecodeMemory))); |
+ SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(&inputStream)); |
- if (!success) { |
+ if (NULL == picture.get()) { |
SkDebugf("Could not read an SkPicture from %s\n", inputPath.c_str()); |
return false; |
} |
@@ -185,7 +182,7 @@ static bool render_pdf(const SkString& inputPath, const SkString& outputDir, |
renderer.render(); |
- success = write_output(outputDir, inputFilename, renderer); |
+ bool success = write_output(outputDir, inputFilename, renderer); |
renderer.end(); |
return success; |