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

Unified Diff: tools/lua/lua_pictures.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/bench_pictures_main.cpp ('k') | tools/pinspect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/lua_pictures.cpp
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp
index f1bca287ad490dae592c4ed33ef00bf6bbb8053b..355a82352aea28d4a558f1b51a1019f226bcc7ce 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "LazyDecodeBitmap.h"
#include "SkLua.h"
#include "SkLuaCanvas.h"
#include "SkPicture.h"
@@ -15,9 +16,6 @@
#include "picture_utils.h"
#include "SkOSFile.h"
#include "SkImageDecoder.h"
-#include "SkForceLinking.h"
-
-__SK_FORCE_IMAGE_DECODER_LINKING;
extern "C" {
#include "lua.h"
@@ -30,9 +28,6 @@ static const char gEndCanvasFunc[] = "sk_scrape_endcanvas";
static const char gAccumulateFunc[] = "sk_scrape_accumulate";
static const char gSummarizeFunc[] = "sk_scrape_summarize";
-// PictureRenderingFlags.cpp
-extern bool lazy_decode_bitmap(const void* buffer, size_t size, SkBitmap*);
-
// Example usage for the modulo flag:
// for i in {0..5}; do lua_pictures --skpPath SKP_PATH -l YOUR_SCRIPT --modulo $i 6 &; done
DEFINE_string(modulo, "", "[--modulo <remainder> <divisor>]: only run tests for which "
@@ -46,7 +41,7 @@ static SkPicture* load_picture(const char path[]) {
SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
SkPicture* pic = NULL;
if (stream.get()) {
- pic = SkPicture::CreateFromStream(stream.get(), &lazy_decode_bitmap);
+ pic = SkPicture::CreateFromStream(stream.get(), &sk_tools::LazyDecodeBitmap);
}
return pic;
}
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | tools/pinspect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698