skia2/gyp/tools.gyp
scroggo@google.com bb281f7f96 Improvements/additions to SkImageCache/SkLazyPixelRef.
SkPurgeableImageCache:
New image cache that uses virtual memory to store the pixels. Combines
features of SkAshmemImageCache (which has been removed) with SkPurgeableMemoryBlock, which has android and Mac versions.

SkImageCache:
Modified the API. pinCache now returns a status out parameter which
states whether the pinned memory retained the old data. This allows
allocAndPinCache to only be used for allocations.
Add a new debug only interface to purge unpinned data.
Updates to documentation, clarifying behavior.
Changed CachedStatus to MemoryStatus

SkLruImageCache:
Implement the new function purgeAllUnpinnedCaches and change implementation
of pinCache for the new behavior.

SkLazyPixelRef:
Rewrite onLockPixels to account for the new behavior of pinCache.

BitmapFactoryTest:
Test the new SkPurgeableImageCache.
Write tests which directly test the SkImageCaches.
Create a larger bitmap, since some of the SkImageCaches are designed
to handle large bitmaps.

bench_ and render_pictures:
Consolidate lazy_decode_bitmap into one function.
Allow using a flag to specify using the purgeable image cache.
Clean up some #includes.

Review URL: https://codereview.chromium.org/12433020

git-svn-id: http://skia.googlecode.com/svn/trunk@8207 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 21:37:39 +00:00

300 lines
7.4 KiB
Python

# GYP file to build various tools.
#
# To build on Linux:
# ./gyp_skia tools.gyp && make tools
#
# Building on other platforms not tested yet.
#
{
'includes': [
'apptype_console.gypi',
],
'targets': [
{
# Build all executable targets defined below.
'target_name': 'tools',
'type': 'none',
'dependencies': [
'bench_pictures',
'filter',
'pinspect',
'render_pdfs',
'render_pictures',
'skdiff',
'skhello',
'skimage',
],
},
{
'target_name': 'skdiff',
'type': 'executable',
'sources': [
'../tools/skdiff.cpp',
'../tools/skdiff.h',
'../tools/skdiff_html.cpp',
'../tools/skdiff_html.h',
'../tools/skdiff_main.cpp',
'../tools/skdiff_utils.cpp',
'../tools/skdiff_utils.h',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
],
},
{
'target_name': 'skimagediff',
'type': 'executable',
'sources': [
'../tools/skdiff.cpp',
'../tools/skdiff.h',
'../tools/skdiff_html.cpp',
'../tools/skdiff_html.h',
'../tools/skdiff_image.cpp',
'../tools/skdiff_utils.cpp',
'../tools/skdiff_utils.h',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
],
},
{
'target_name': 'skhello',
'type': 'executable',
'sources': [
'../tools/skhello.cpp',
'../tools/SkFlags.h',
'../tools/SkFlags.cpp',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
],
},
{
'target_name': 'skimage',
'type': 'executable',
'sources': [
'../tools/skimage_main.cpp',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
],
},
{
'target_name': 'render_pictures',
'type': 'executable',
'sources': [
'../tools/render_pictures_main.cpp',
],
'include_dirs': [
'../src/pipe/utils/',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'tools.gyp:picture_renderer',
'tools.gyp:picture_utils',
'ports.gyp:ports',
],
},
{
'target_name': 'bench_pictures',
'type': 'executable',
'sources': [
'../bench/SkBenchLogger.h',
'../bench/SkBenchLogger.cpp',
'../bench/TimerData.h',
'../bench/TimerData.cpp',
'../tools/bench_pictures_main.cpp',
'../tools/PictureBenchmark.cpp',
],
'include_dirs': [
'../bench',
'../src/lazy/',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'tools.gyp:picture_utils',
'tools.gyp:picture_renderer',
'bench.gyp:bench_timer',
'ports.gyp:ports',
],
},
{
'target_name': 'picture_renderer',
'type': 'static_library',
'sources': [
'../tools/PictureRenderer.h',
'../tools/PictureRenderer.cpp',
'../tools/PictureRenderingFlags.h',
'../tools/PictureRenderingFlags.cpp',
'../tools/CopyTilesRenderer.h',
'../tools/CopyTilesRenderer.cpp',
'../tools/SkFlags.h',
'../tools/SkFlags.cpp',
'../src/pipe/utils/SamplePipeControllers.h',
'../src/pipe/utils/SamplePipeControllers.cpp',
],
'include_dirs': [
'../src/core/',
'../src/pipe/utils/',
'../src/utils/',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
'tools.gyp:picture_utils',
],
'conditions': [
['skia_gpu == 1',
{
'include_dirs' : [
'../src/gpu',
],
},
],
],
'export_dependent_settings': [
'images.gyp:images',
],
},
{
'target_name': 'render_pdfs',
'type': 'executable',
'sources': [
'../tools/render_pdfs_main.cpp',
'../tools/PdfRenderer.cpp',
'../tools/PdfRenderer.h',
],
'include_dirs': [
'../src/pipe/utils/',
'../src/utils/',
],
'dependencies': [
'core.gyp:core',
'effects.gyp:effects',
'images.gyp:images',
'pdf.gyp:pdf',
'ports.gyp:ports',
'tools.gyp:picture_utils',
],
'conditions': [
['skia_win_debuggers_path and skia_os == "win"',
{
'dependencies': [
'tools.gyp:win_dbghelp',
],
},
],
# VS static libraries don't have a linker option. We must set a global
# project linker option, or add it to each executable.
['skia_win_debuggers_path and skia_os == "win" and '
'skia_arch_width == 64',
{
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': [
'<(skia_win_debuggers_path)/x64/DbgHelp.lib',
],
},
},
},
],
['skia_win_debuggers_path and skia_os == "win" and '
'skia_arch_width == 32',
{
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': [
'<(skia_win_debuggers_path)/DbgHelp.lib',
],
},
},
},
],
],
},
{
'target_name': 'picture_utils',
'type': 'static_library',
'sources': [
'../tools/picture_utils.cpp',
'../tools/picture_utils.h',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
],
},
{
'target_name': 'pinspect',
'type': 'executable',
'sources': [
'../tools/pinspect.cpp',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
],
},
{
'target_name': 'filter',
'type': 'executable',
'include_dirs' : [
'../src/core',
'../debugger',
],
'sources': [
'../tools/filtermain.cpp',
'../tools/path_utils.h',
'../tools/path_utils.cpp',
'../debugger/SkDrawCommand.h',
'../debugger/SkDrawCommand.cpp',
'../debugger/SkDebugCanvas.h',
'../debugger/SkDebugCanvas.cpp',
'../debugger/SkObjectParser.h',
'../debugger/SkObjectParser.cpp',
],
'dependencies': [
'skia_base_libs.gyp:skia_base_libs',
'effects.gyp:effects',
'images.gyp:images',
'tools.gyp:picture_utils',
],
},
],
'conditions': [
['skia_win_debuggers_path and skia_os == "win"',
{
'targets': [
{
'target_name': 'win_dbghelp',
'type': 'static_library',
'defines': [
'SK_CDB_PATH="<(skia_win_debuggers_path)"',
],
'sources': [
'../tools/win_dbghelp.h',
'../tools/win_dbghelp.cpp',
],
},
],
},
],
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2: