Add the lazy decoder from PictureFlags to SkImageDecoder
R=caryclark@google.com, scroggo@google.com
Author: sglez@google.com
Review URL: https://chromiumcodereview.appspot.com/19109002
git-svn-id: http://skia.googlecode.com/svn/trunk@10111 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index de477d3..a2dff67 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -5,11 +5,11 @@
* found in the LICENSE file.
*/
+#include "LazyDecodeBitmap.h"
#include "CopyTilesRenderer.h"
#include "SkBitmap.h"
#include "SkDevice.h"
#include "SkCommandLineFlags.h"
-#include "SkForceLinking.h"
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
@@ -22,9 +22,6 @@
#include "PictureRenderingFlags.h"
#include "picture_utils.h"
-// Required to ensure that image decoders get linked correctly.
-__SK_FORCE_IMAGE_DECODER_LINKING;
-
// Flags used by this file, alphabetically:
DEFINE_int32(clone, 0, "Clone the picture n times before rendering.");
DECLARE_bool(deferImageDecoding);
@@ -49,9 +46,6 @@
path->remove(path->size() - 4, 4);
}
-// Defined in PictureRenderingFlags.cpp
-extern bool lazy_decode_bitmap(const void* buffer, size_t size, SkBitmap* bitmap);
-
////////////////////////////////////////////////////////////////////////////////////////////////////
/**
@@ -151,7 +145,7 @@
SkPicture::InstallPixelRefProc proc;
if (FLAGS_deferImageDecoding) {
- proc = &lazy_decode_bitmap;
+ proc = &sk_tools::LazyDecodeBitmap;
} else if (FLAGS_writeEncodedImages) {
SkASSERT(!FLAGS_writePath.isEmpty());
reset_image_file_base_name(inputFilename);