diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-16 18:21:46 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-16 18:21:46 +0000 |
commit | 56799e2ee6b74dacb74babeb5217b65367915ed8 (patch) | |
tree | 28fdde6c5be08087a0160f539aa4abc3988b4ec4 /tools/lua | |
parent | b92f9fb0f5abbb9129032fc0ebdc6bd358a06083 (diff) |
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
Diffstat (limited to 'tools/lua')
-rw-r--r-- | tools/lua/lua_pictures.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp index f1bca287ad..355a82352a 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; } |