"third_party/externals/yasm/binaries" : "https://chromium.googlesource.com/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881",
"platform_tools/android/third_party/externals/expat" : "https://android.googlesource.com/platform/external/expat.git@android-5.1.0_r3",
- "platform_tools/android/third_party/externals/jpeg" : "https://android.googlesource.com/platform/external/jpeg.git@android-5.1.0_r3",
- "platform_tools/android/third_party/externals/png" : "https://android.googlesource.com/platform/external/libpng.git@android-4.2.2_r1.2",
"platform_tools/chromeos/toolchain/src/third_party/chromite": "https://chromium.googlesource.com/chromiumos/chromite.git@d6a4c7e0ee4d53ddc5238dbddfc0417796a70e54",
"platform_tools/chromeos/toolchain/src/third_party/pyelftools": "https://chromium.googlesource.com/chromiumos/third_party/pyelftools.git@bdc1d380acd88d4bfaf47265008091483b0d614e",
},
},
{
- 'target_name': 'jpeg',
+ 'target_name': 'libjpeg-turbo',
'type': 'none',
'direct_dependent_settings': {
'libraries' : [
- '-ljpeg',
+ '-ljpeg-turbo',
],
'include_dirs': [
- 'external/jpeg',
+ 'external/libjpeg-turbo',
],
},
},
'dependencies': [
'core.gyp:*',
'giflib.gyp:giflib',
+ 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
+ 'libpng.gyp:libpng',
'libwebp.gyp:libwebp',
],
'cflags':[
'../include/codec',
],
},
- 'conditions': [
- [ 'skia_android_framework == 1',
- {
- # TODO(djsollen): this is a temporary dependency until we can update
- # the android framework to a more recent version of libpng.
- 'dependencies': [
- 'libpng.gyp:libpng',
- ],
- # TODO(msarett): Add libjpeg-turbo to Android so we can compile SkJpegCodec
- # for the framework.
- 'sources!': [
- '../src/codec/SkJpegCodec.cpp',
- '../src/codec/SkJpegDecoderMgr.cpp',
- '../src/codec/SkJpegUtility_codec.cpp',
- ],
- }, { # !skia_android_framework
- 'dependencies': [
- # TODO(msarett): Add libjpeg-turbo to Android so this can be a global
- # dependency.
- 'libjpeg-turbo.gyp:libjpeg-turbo',
- 'libpng.gyp:libpng_static',
- ],
- 'export_dependent_settings': [
- 'libjpeg-turbo.gyp:libjpeg-turbo',
- ],
- 'defines': [
- 'TURBO_HAS_SKIP',
- ],
- }
- ]
- ]
+ 'defines': [
+ 'TURBO_HAS_SKIP',
+ ],
},
],
}
'etc1.gyp:libetc1',
'flags.gyp:flags',
'jsoncpp.gyp:jsoncpp',
- 'libpng.gyp:libpng_static_when_possible',
+ 'libpng.gyp:libpng',
'skia_lib.gyp:skia_lib',
'svg.gyp:svg',
'tools.gyp:bitmap_region_decoder',
'dependencies': [
'core.gyp:*',
'giflib.gyp:giflib',
- 'libjpeg.gyp:*',
+ 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
'etc1.gyp:libetc1',
'ktx.gyp:libSkKTX',
'libwebp.gyp:libwebp',
],
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
- 'export_dependent_settings': [
- 'libpng.gyp:libpng',
- ],
'dependencies': [
'libpng.gyp:libpng',
],
'include_dirs': [
'../src/utils',
],
- 'dependencies': [
- 'android_deps.gyp:png',
- ],
'cflags' : [
# SkImageDecoder_libpng includes png.h.
# In the version of libpng that we use on Android (1.2.46),
# in png.h, triggering a warning in C++11.
'-Wno-literal-suffix',
],
+ 'dependencies': [
+ 'libpng.gyp:libpng',
+ ],
'conditions': [
- [ 'skia_android_framework == 0', {
- 'export_dependent_settings': [
- 'android_deps.gyp:png',
- 'libjpeg.gyp:*'
- ],
- }, {
+ [ 'skia_android_framework == 1', {
# The android framework disables these decoders as they are of little use to
# Java applications that can't take advantage of the compressed formats.
'sources!': [
--- /dev/null
+# Copyright 2015 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This arguably should go in libjpeg-turbo.gyp. But if we put it there, gyp
+# gets overeager and starts trying to parse all of the targets in that file.
+# And it will fail to parse a target it doesn't need anyway when we are
+# building for the android framework. So we will add this file as another
+# layer of indirection.
+{
+ 'targets': [
+ {
+ 'target_name': 'libjpeg-turbo-selector',
+ 'type': 'none',
+ 'conditions': [
+ [ 'skia_android_framework', {
+ 'dependencies': [ 'android_deps.gyp:libjpeg-turbo' ],
+ 'export_dependent_settings': [ 'android_deps.gyp:libjpeg-turbo' ],
+ },{
+ 'dependencies': [ 'libjpeg-turbo.gyp:libjpeg-turbo' ],
+ 'export_dependent_settings': [ 'libjpeg-turbo.gyp:libjpeg-turbo' ],
+ }]
+ ]
+ },
+ ]
+}
+++ /dev/null
-# Copyright 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This is a copy of ../third_party/externals/libjpeg/libjpeg.gyp , modified
-# such that all source paths point into that directory.
-# See http://code.google.com/p/skia/issues/detail?id=543 ('wrap libjpeg.gyp
-# from Chrome's libjpeg port, rather than making our own copy') for a better
-# long-term solution.
-
-{
- 'variables': {
- 'use_system_libjpeg%': 0,
- 'skia_warnings_as_errors': 0,
- },
- 'conditions': [
- ['skia_os == "android"', {
- 'targets': [
- {
- 'target_name': 'libjpeg',
- 'type': 'none',
- 'dependencies': [
- 'android_deps.gyp:jpeg',
- ],
- 'export_dependent_settings': [
- 'android_deps.gyp:jpeg',
- ],
- },
- ],
- }, { # skia_os != android
- 'targets': [
- {
- 'target_name': 'libjpeg',
- 'type': 'none',
- 'dependencies': [
- 'libjpeg-turbo.gyp:libjpeg-turbo',
- ],
- 'export_dependent_settings': [
- 'libjpeg-turbo.gyp:libjpeg-turbo',
- ],
- },
- ],
- }],
- ],
-}
{
'target_name': 'libpng',
'type': 'none',
- 'conditions': [
- [ 'skia_os == "android"', {
- 'dependencies': [ 'android_deps.gyp:png' ],
- 'export_dependent_settings': [ 'android_deps.gyp:png' ],
- },{
- 'dependencies': [ 'libpng.gyp:libpng_static' ],
- 'export_dependent_settings': [ 'libpng.gyp:libpng_static' ],
- }]
- ]
- },
- {
- 'target_name': 'libpng_static_when_possible',
- 'type': 'none',
'conditions': [
[ 'skia_android_framework', {
'dependencies': [ 'android_deps.gyp:png' ],
],
}
},
- {
- 'target_name': 'png',
- 'type': 'static_library',
- 'sources': [
- '../third_party/externals/png/png.c',
- '../third_party/externals/png/pngerror.c',
- '../third_party/externals/png/pnggccrd.c',
- '../third_party/externals/png/pngget.c',
- '../third_party/externals/png/pngmem.c',
- '../third_party/externals/png/pngpread.c',
- '../third_party/externals/png/pngread.c',
- '../third_party/externals/png/pngrio.c',
- '../third_party/externals/png/pngrtran.c',
- '../third_party/externals/png/pngrutil.c',
- '../third_party/externals/png/pngset.c',
- '../third_party/externals/png/pngtrans.c',
- '../third_party/externals/png/pngvcrd.c',
- '../third_party/externals/png/pngwio.c',
- '../third_party/externals/png/pngwrite.c',
- '../third_party/externals/png/pngwtran.c',
- '../third_party/externals/png/pngwutil.c',
- ],
- 'include_dirs': [
- '../third_party/externals/png',
- ],
- 'cflags': [
- '-w',
- '-fvisibility=hidden',
- ],
- 'link_settings': {
- 'libraries': [
- '-lz',
- ],
- },
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/externals/png',
- ],
- }
- },
- {
- 'target_name': 'jpeg',
- 'type': 'static_library',
- 'dependencies': [
- 'ashmem'
- ],
- 'sources': [
- '../third_party/externals/jpeg/jcapimin.c',
- '../third_party/externals/jpeg/jcapistd.c',
- '../third_party/externals/jpeg/jccoefct.c',
- '../third_party/externals/jpeg/jccolor.c',
- '../third_party/externals/jpeg/jcdctmgr.c',
- '../third_party/externals/jpeg/jchuff.c',
- '../third_party/externals/jpeg/jcinit.c',
- '../third_party/externals/jpeg/jcmainct.c',
- '../third_party/externals/jpeg/jcmarker.c',
- '../third_party/externals/jpeg/jcmaster.c',
- '../third_party/externals/jpeg/jcomapi.c',
- '../third_party/externals/jpeg/jcparam.c',
- '../third_party/externals/jpeg/jcphuff.c',
- '../third_party/externals/jpeg/jcprepct.c',
- '../third_party/externals/jpeg/jcsample.c',
- '../third_party/externals/jpeg/jctrans.c',
- '../third_party/externals/jpeg/jdapimin.c',
- '../third_party/externals/jpeg/jdapistd.c',
- '../third_party/externals/jpeg/jdatadst.c',
- '../third_party/externals/jpeg/jdatasrc.c',
- '../third_party/externals/jpeg/jdcoefct.c',
- '../third_party/externals/jpeg/jdcolor.c',
- '../third_party/externals/jpeg/jddctmgr.c',
- '../third_party/externals/jpeg/jdhuff.c',
- '../third_party/externals/jpeg/jdinput.c',
- '../third_party/externals/jpeg/jdmainct.c',
- '../third_party/externals/jpeg/jdmarker.c',
- '../third_party/externals/jpeg/jdmaster.c',
- '../third_party/externals/jpeg/jdmerge.c',
- '../third_party/externals/jpeg/jdphuff.c',
- '../third_party/externals/jpeg/jdpostct.c',
- '../third_party/externals/jpeg/jdsample.c',
- '../third_party/externals/jpeg/jdtrans.c',
- '../third_party/externals/jpeg/jerror.c',
- '../third_party/externals/jpeg/jfdctflt.c',
- '../third_party/externals/jpeg/jfdctfst.c',
- '../third_party/externals/jpeg/jfdctint.c',
- '../third_party/externals/jpeg/jidctflt.c',
- '../third_party/externals/jpeg/jidctfst.c',
- '../third_party/externals/jpeg/jidctint.c',
- '../third_party/externals/jpeg/jidctred.c',
- '../third_party/externals/jpeg/jmem-ashmem.c',
- '../third_party/externals/jpeg/jmemmgr.c',
- '../third_party/externals/jpeg/jquant1.c',
- '../third_party/externals/jpeg/jquant2.c',
- '../third_party/externals/jpeg/jutils.c',
- ],
- 'conditions': [
- # FIXME (msarett):
- # Turn off Arm NEON optimizations to avoid namespace conflicts when
- # compiling libjpeg and libjpeg-turbo. This is a temporary step in the
- # plan to replace libjpeg with libjpeg-turbo.
- #[ 'arm_neon == 1 and skia_clang_build == 0',
- # {
- # 'sources' : [
- # '../third_party/externals/jpeg/armv6_idct.S',
- # '../third_party/externals/jpeg/jsimd_arm_neon.S',
- # '../third_party/externals/jpeg/jsimd_neon.c',
- # ],
- # 'defines' : [
- # 'NV_ARM_NEON',
- # ],
- # },
- #],
- [ '"mips" in skia_arch_type and mips_dsp == 2',
- {
- 'sources' : [
- '../third_party/externals/jpeg/mips_jidctfst.c',
- '../third_party/externals/jpeg/mips_idct_le.S',
- ],
- 'defines' : [
- 'ANDROID_MIPS_IDCT',
- ],
- },
- ],
- [ '"x86" in skia_arch_type',
- {
- 'sources' : [
- '../third_party/externals/jpeg/jidctintelsse.c',
- ],
- 'defines' : [
- 'ANDROID_INTELSSE2_IDCT',
- ],
- },
- ],
- ],
- 'include_dirs': [
- '../third_party/externals/jpeg',
- ],
- 'cflags': [
- '-w',
- '-fvisibility=hidden',
- '-DAVOID_TABLES',
- '-DUSE_ANDROID_ASHMEM',
- '-O3',
- '-fstrict-aliasing',
- '-fprefetch-loop-arrays',
- '-DANDROID_TILE_BASED_DECODE',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/externals/jpeg',
- ],
- }
- },
{
# This target is a dependency for all console-type Skia applications which
# will run on Android. Since Android requires us to load native code in
#include "SkCodec_libpng.h"
#include "SkCodec_wbmp.h"
#include "SkCodecPriv.h"
-#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && !defined(GOOGLE3)
+#if !defined(GOOGLE3)
#include "SkJpegCodec.h"
#endif
#include "SkStream.h"
static const DecoderProc gDecoderProcs[] = {
{ SkPngCodec::IsPng, SkPngCodec::NewFromStream },
-#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && !defined(GOOGLE3)
+#if !defined(GOOGLE3)
{ SkJpegCodec::IsJpeg, SkJpegCodec::NewFromStream },
#endif
{ SkWebpCodec::IsWebp, SkWebpCodec::NewFromStream },
"Suppress most JPG error messages when decode "
"function fails.");
-#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_JPEG_NO_INDEX_SUPPORTED)
-#define SK_JPEG_INDEX_SUPPORTED
-#endif
-
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
"Suppress most PNG warnings when calling image decode "
"functions.");
-#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_PNG_NO_INDEX_SUPPORTED)
-#define SK_PNG_INDEX_SUPPORTED
-#endif
-
class SkPNGImageIndex {
public:
// Takes ownership of stream.
#include "SkJpegUtility.h"
-#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_JPEG_NO_INDEX_SUPPORTED)
-#define SK_JPEG_INDEX_SUPPORTED
-#endif
-
/////////////////////////////////////////////////////////////////////
static void sk_init_source(j_decompress_ptr cinfo) {
skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src;