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

Unified Diff: tools/render_pictures_main.cpp

Issue 19109002: Add the lazy decoder from PictureFlags to SkImageDecoder (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add include Created 7 years, 5 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 | « tools/pinspect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/render_pictures_main.cpp
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index de477d3336157468157707bc410f64ea772d3b3b..a2dff67d10971d05514337ff286cc6fb728c946e 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 @@ static void make_output_filepath(SkString* path, const SkString& dir,
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 @@ static bool render_picture(const SkString& inputPath, const SkString* outputDir,
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);
« no previous file with comments | « tools/pinspect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698