| Index: tools/render_pictures_main.cpp
|
| diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
|
| index 5d64e74bb07de4922ef856da53906e3f3b5651e7..23d1c52190da8be5ae32aebb27a1d6f8a6f00fa1 100644
|
| --- a/tools/render_pictures_main.cpp
|
| +++ b/tools/render_pictures_main.cpp
|
| @@ -44,36 +44,8 @@ static void make_output_filepath(SkString* path, const SkString& dir,
|
| path->remove(path->size() - 4, 4);
|
| }
|
|
|
| -#include "SkData.h"
|
| -#include "SkLruImageCache.h"
|
| -
|
| -static SkLruImageCache gLruImageCache(1024*1024);
|
| -
|
| -#ifdef SK_BUILD_FOR_ANDROID
|
| -#include "SkAshmemImageCache.h"
|
| -#include "SkImage.h"
|
| -
|
| -static SkImageCache* cache_selector(const SkImage::Info& info) {
|
| - if (info.fWidth * info.fHeight > 32 * 1024) {
|
| - return SkAshmemImageCache::GetAshmemImageCache();
|
| - }
|
| - return &gLruImageCache;
|
| -}
|
| -
|
| -#endif
|
| -
|
| -static bool lazy_decode_bitmap(const void* buffer, size_t size, SkBitmap* bitmap) {
|
| - void* copiedBuffer = sk_malloc_throw(size);
|
| - memcpy(copiedBuffer, buffer, size);
|
| - SkAutoDataUnref data(SkData::NewFromMalloc(copiedBuffer, size));
|
| - SkBitmapFactory factory(&SkImageDecoder::DecodeMemoryToTarget);
|
| -#ifdef SK_BUILD_FOR_ANDROID
|
| - factory.setCacheSelector(&cache_selector);
|
| -#else
|
| - factory.setImageCache(&gLruImageCache);
|
| -#endif
|
| - return factory.installPixelRef(data, bitmap);
|
| -}
|
| +// Defined in PictureRenderingFlags.cpp
|
| +extern bool lazy_decode_bitmap(const void* buffer, size_t size, SkBitmap* bitmap);
|
|
|
| static bool render_picture(const SkString& inputPath, const SkString* outputDir,
|
| sk_tools::PictureRenderer& renderer,
|
|
|