2013-05-20 22:15:32 +00:00
|
|
|
# GYP file for images project.
|
2013-04-17 21:07:55 +00:00
|
|
|
{
|
2011-05-31 13:50:51 +00:00
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'images',
|
2012-10-10 19:45:51 +00:00
|
|
|
'product_name': 'skia_images',
|
2011-05-31 13:50:51 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2011-06-23 21:43:52 +00:00
|
|
|
'dependencies': [
|
2013-07-22 14:39:45 +00:00
|
|
|
'core.gyp:*',
|
2012-04-05 14:52:01 +00:00
|
|
|
'libjpeg.gyp:*',
|
2013-03-14 14:42:18 +00:00
|
|
|
'libwebp.gyp:libwebp',
|
2011-06-23 21:43:52 +00:00
|
|
|
'utils.gyp:utils',
|
|
|
|
],
|
2014-02-05 16:35:12 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'skia_android_framework == 0', {
|
|
|
|
'export_dependent_settings': [
|
|
|
|
'libjpeg.gyp:*',
|
|
|
|
],
|
|
|
|
}],
|
2012-04-05 14:52:01 +00:00
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/images',
|
2013-11-21 15:32:08 +00:00
|
|
|
'../src/lazy',
|
2013-04-25 17:33:51 +00:00
|
|
|
# for access to SkErrorInternals.h
|
|
|
|
'../src/core/',
|
2013-02-22 21:38:35 +00:00
|
|
|
# for access to SkImagePriv.h
|
|
|
|
'../src/image/',
|
2013-08-28 19:13:13 +00:00
|
|
|
# So src/ports/SkImageDecoder_CG can access SkStreamHelpers.h
|
|
|
|
'../src/images/',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'sources': [
|
2013-05-31 14:00:10 +00:00
|
|
|
'../include/images/SkForceLinking.h',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../include/images/SkImageRef.h',
|
|
|
|
'../include/images/SkImageRef_GlobalPool.h',
|
2013-03-22 16:44:14 +00:00
|
|
|
'../src/images/SkJpegUtility.h',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../include/images/SkMovie.h',
|
|
|
|
'../include/images/SkPageFlipper.h',
|
|
|
|
|
|
|
|
'../src/images/bmpdecoderhelper.cpp',
|
|
|
|
'../src/images/bmpdecoderhelper.h',
|
2013-03-14 14:42:18 +00:00
|
|
|
|
2013-11-21 15:32:08 +00:00
|
|
|
'../src/images/SkDecodingImageGenerator.cpp',
|
2013-12-05 18:31:42 +00:00
|
|
|
'../src/images/SkDecodingImageGenerator.h',
|
2013-05-31 14:00:10 +00:00
|
|
|
'../src/images/SkForceLinking.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder.cpp',
|
2013-04-17 21:07:55 +00:00
|
|
|
'../src/images/SkImageDecoder_FactoryDefault.cpp',
|
|
|
|
'../src/images/SkImageDecoder_FactoryRegistrar.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
|
2013-05-01 21:17:27 +00:00
|
|
|
# If decoders are added/removed to/from (all/individual)
|
2013-05-31 14:00:10 +00:00
|
|
|
# platform(s), be sure to update SkForceLinking.cpp
|
2013-05-01 21:17:27 +00:00
|
|
|
# so the right decoders will be forced to link.
|
2014-02-05 16:35:12 +00:00
|
|
|
|
|
|
|
# IMPORTANT: The build order of the SkImageDecoder_*.cpp files
|
|
|
|
# defines the order image decoders are tested when decoding a
|
|
|
|
# stream. The last decoder is the first one tested, so the .cpp
|
|
|
|
# files should be in listed in order from the least likely to be
|
|
|
|
# used, to the most likely (jpeg and png should be the last two
|
|
|
|
# for instance.) As a result, they are deliberately not in
|
|
|
|
# alphabetical order.
|
|
|
|
'../src/images/SkImageDecoder_wbmp.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libbmp.cpp',
|
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkImageDecoder_libico.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
'../src/images/SkImageDecoder_libwebp.cpp',
|
2013-03-14 14:42:18 +00:00
|
|
|
'../src/images/SkImageDecoder_libjpeg.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libpng.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageEncoder.cpp',
|
|
|
|
'../src/images/SkImageEncoder_Factory.cpp',
|
2013-04-23 18:06:23 +00:00
|
|
|
'../src/images/SkImageEncoder_argb.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageRef.cpp',
|
|
|
|
'../src/images/SkImageRefPool.cpp',
|
|
|
|
'../src/images/SkImageRefPool.h',
|
2013-02-01 15:57:13 +00:00
|
|
|
'../src/images/SkImageRef_ashmem.h',
|
|
|
|
'../src/images/SkImageRef_ashmem.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageRef_GlobalPool.cpp',
|
Add the ability to provide function pointers to SkPicture serialization
and deserialization for encoding and decoding bitmaps.
Remove kForceFlattenBitmapPixels_Flag, which is no longer used.
When an SkOrderedReadBuffer needs to read a bitmap, if it does not
have an image decoder, use a dummy bitmap.
In GM, add a tolerance option for color differences, used when
testing picture serialization, so it can assume two images are the
same even though PNG encoding/decoding may have resulted in small
differences.
Create dummy implementations for SkImageDecoder and SkImageEncoder
functions in SkImageDecoder_empty so that a project that does not
want to include the images project it can still build.
Allow ports to build without images project.
In Mac's image encoder, copy 4444 to 8888 before encoding.
Add SkWriter32::reservePad, to provide a pointer to write non 4 byte
aligned data, padded with zeroes.
In bench_ and render_ pictures, pass decode function to SkPicture
creation from a stream.
BUG=https://code.google.com/p/skia/issues/detail?id=842
Review URL: https://codereview.appspot.com/6551071
git-svn-id: http://skia.googlecode.com/svn/trunk@5818 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-04 21:46:08 +00:00
|
|
|
'../src/images/SkImages.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkJpegUtility.cpp',
|
|
|
|
'../src/images/SkMovie.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
'../src/images/SkPageFlipper.cpp',
|
|
|
|
'../src/images/SkScaledBitmapSampler.cpp',
|
|
|
|
'../src/images/SkScaledBitmapSampler.h',
|
2013-08-21 15:01:48 +00:00
|
|
|
'../src/images/SkStreamHelpers.cpp',
|
|
|
|
'../src/images/SkStreamHelpers.h',
|
2011-06-22 20:42:34 +00:00
|
|
|
|
|
|
|
'../src/ports/SkImageDecoder_CG.cpp',
|
|
|
|
'../src/ports/SkImageDecoder_WIC.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'conditions': [
|
2011-07-01 20:20:07 +00:00
|
|
|
[ 'skia_os == "win"', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'sources!': [
|
2013-04-17 21:07:55 +00:00
|
|
|
'../src/images/SkImageDecoder_FactoryDefault.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkImageDecoder_libpng.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
],
|
2011-11-21 21:04:06 +00:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
Libraries without '-l' treated as relative paths.
The following have the same effect on Windows:
'msvs_settings': { 'VCLinkerTool': { 'AdditionalDependencies': [ 'windowscodecs.lib', ],},},
'link_settings': {'libraries': ['-lwindowscodecs.lib',],},
But this one is different:
'link_settings': {'libraries': ['windowscodecs.lib',],},
since this last one will attempt to find the library at
third_party\skia\gyp\windowscodecs.lib
or a place like this, instead of looking in the library paths.
This also fixes capitalization of the affected libraries.
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/99463002
git-svn-id: http://skia.googlecode.com/svn/trunk@12434 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 19:54:33 +00:00
|
|
|
'-lwindowscodecs.lib',
|
2011-11-21 21:04:06 +00:00
|
|
|
],
|
|
|
|
},
|
2011-07-01 20:20:07 +00:00
|
|
|
},{ #else if skia_os != win
|
2011-06-22 20:42:34 +00:00
|
|
|
'sources!': [
|
|
|
|
'../src/ports/SkImageDecoder_WIC.cpp',
|
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
}],
|
2012-09-18 15:41:18 +00:00
|
|
|
[ 'skia_os in ["mac", "ios"]', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'sources!': [
|
2013-04-17 21:07:55 +00:00
|
|
|
'../src/images/SkImageDecoder_FactoryDefault.cpp',
|
2011-06-15 17:33:29 +00:00
|
|
|
'../src/images/SkImageDecoder_libpng.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
],
|
2011-07-01 20:20:07 +00:00
|
|
|
},{ #else if skia_os != mac
|
2011-06-22 20:42:34 +00:00
|
|
|
'sources!': [
|
|
|
|
'../src/ports/SkImageDecoder_CG.cpp',
|
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
}],
|
2013-04-11 22:24:35 +00:00
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
|
Build Skia for a bare-bones embedded Linux system.
Motivation:
I have downloaded a barebones Linux system built for 64-bit ARM
from linaro.org and a ARMv8 Foundation Model from arm.com to run
it on. This will let us build and test Skia on ARM64 before we
aquire hardware to allow that. This CL introduces the changes to
the build files necessary to build Skia on a barebones embedded
Linux system. I tested it with the aarch64 GCC compiler provided
by linaro.org.
Changes:
Add a "barelinux" target_os for the DEPS file. Add an optional
git download of zlib.
Changes to gyp files: these changes abstract out libpng, libz, and
giflib so that images.gyp doesn't know whether they are static or
dynamically linked. I also add the variables skia_giflib_static,
skia_libpng_static, skia_zlib_static, and skia_freetype_static,
all of which default to false but when set to true will override
the behavior of the giflib, libpng, zlib, and freetype build
targets to require them to build statically. Also, the
skia_no_fontconfig variable turns off use of the fontconfig service.
Scripts in platform_tools/barelinux/bin:
arm64_download - this script downloads the Linaro's ARMv8 Aarch64
toolchain and minimal embedded Linux system as well as ARM's
foundation model. The required files are mirrored on Google
Cloud. The script then starts a emulated Arm64 Linux system in
the background. After the boot is complete, you can SSH into the
system at port 8022 via user@localhost. The SSH key will be
downloaded into the working directery as well.
download_deps - Uses gclient to download Skia's dependencies for a
bare Linux system (the normal dependecies plus giflib, libpng, and
zlib.)
barelinux_make - this script builds a version of skia that does
not depend on external libraries, perfect for putting in an
embedded system running Linux. Assumes you have run download_deps
first.
To test:
To build a barelinux target, use the barelinux_make script.
To build for a armv8 system: skia_arch_type=arm arm_neon=0 armv7=1
armv8=1 arm_thumb=0 skia_arch_width=64 and set the CC and CXX
variables to point at the cross-compiler downloaded by
arm64_download.
R=djsollen@google.com, scroggo@google.com, borenet@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/152513007
git-svn-id: http://skia.googlecode.com/svn/trunk@13570 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-24 20:22:34 +00:00
|
|
|
'export_dependent_settings': [
|
|
|
|
'libpng.gyp:libpng',
|
|
|
|
'giflib.gyp:giflib'
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'libpng.gyp:libpng',
|
|
|
|
'giflib.gyp:giflib'
|
|
|
|
],
|
2013-04-11 18:32:01 +00:00
|
|
|
# end libpng/libgif stuff
|
2011-05-31 13:50:51 +00:00
|
|
|
}],
|
2013-04-11 22:24:35 +00:00
|
|
|
# FIXME: NaCl should be just like linux, etc, above, but it currently is separated out
|
|
|
|
# to remove gif. Once gif is supported by naclports, this can be merged into the above
|
|
|
|
# condition.
|
|
|
|
[ 'skia_os == "nacl"', {
|
|
|
|
'sources!': [
|
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
],
|
|
|
|
}],
|
2011-11-03 13:08:29 +00:00
|
|
|
[ 'skia_os == "android"', {
|
2013-02-01 15:57:13 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../src/utils',
|
2011-11-03 13:08:29 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2012-08-09 15:54:28 +00:00
|
|
|
'android_deps.gyp:gif',
|
|
|
|
'android_deps.gyp:png',
|
2011-11-03 13:08:29 +00:00
|
|
|
],
|
2014-02-05 16:35:12 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'skia_android_framework == 0', {
|
|
|
|
'export_dependent_settings': [
|
|
|
|
'android_deps.gyp:png'
|
|
|
|
],
|
|
|
|
}],
|
2013-07-23 15:51:12 +00:00
|
|
|
],
|
2013-02-01 15:57:13 +00:00
|
|
|
},{ #else if skia_os != android
|
|
|
|
'sources!': [
|
|
|
|
'../src/images/SkImageRef_ashmem.h',
|
|
|
|
'../src/images/SkImageRef_ashmem.cpp',
|
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
}],
|
2013-06-11 15:52:19 +00:00
|
|
|
[ 'skia_os == "chromeos"', {
|
|
|
|
'dependencies': [
|
|
|
|
'chromeos_deps.gyp:gif',
|
2014-02-24 21:39:01 +00:00
|
|
|
'libpng.gyp:libpng',
|
2013-06-11 15:52:19 +00:00
|
|
|
],
|
|
|
|
}],
|
2012-09-18 15:41:18 +00:00
|
|
|
[ 'skia_os == "ios"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/utils/mac',
|
|
|
|
],
|
|
|
|
}],
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/images',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|