diff options
-rw-r--r-- | BUILD.gn | 145 | ||||
-rw-r--r-- | dm/DM.cpp | 1 | ||||
-rw-r--r-- | gyp/tools.gyp | 3 | ||||
-rw-r--r-- | third_party/expat/BUILD.gn | 21 | ||||
-rw-r--r-- | third_party/giflib/BUILD.gn | 19 | ||||
-rw-r--r-- | third_party/jsoncpp/BUILD.gn | 21 | ||||
-rw-r--r-- | third_party/libjpeg_turbo/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/libpng/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/libwebp/BUILD.gn | 59 | ||||
-rw-r--r-- | third_party/third_party.gni | 6 | ||||
-rw-r--r-- | third_party/zlib/BUILD.gn | 5 | ||||
-rw-r--r-- | tools/ProcStats.cpp | 1 |
12 files changed, 277 insertions, 14 deletions
@@ -7,6 +7,7 @@ declare_args() { } skia_public_includes = [ + "include/android", "include/codec", "include/config", "include/core", @@ -16,8 +17,10 @@ skia_public_includes = [ "include/images", "include/pathops", "include/ports", + "include/svg", "include/utils", "include/utils/mac", + "include/xml", "include/c", # TODO: move back to top, order shouldn't matter ] @@ -39,6 +42,8 @@ config("skia_private") { "src/config", "src/core", "src/effects", + "src/effects/gradients", + "src/fonts", "src/gpu", "src/image", "src/images", @@ -148,14 +153,19 @@ component("skia") { ":opts_avx", ":opts_sse41", ":opts_ssse3", + "//third_party/expat", + "//third_party/giflib", "//third_party/libjpeg_turbo", "//third_party/libpng", + "//third_party/libwebp", "//third_party/zlib", ] defines = [ + "SK_HAS_GIF_LIBRARY", "SK_HAS_JPEG_LIBRARY", "SK_HAS_PNG_LIBRARY", + "SK_HAS_WEBP_LIBRARY", ] libs = [ "pthread" ] @@ -168,12 +178,16 @@ component("skia") { sources += pdf_gypi.sources sources += utils_gypi.sources sources += [ + "src/android/SkBitmapRegionCodec.cpp", + "src/android/SkBitmapRegionDecoder.cpp", + "src/codec/SkAndroidCodec.cpp", "src/codec/SkBmpCodec.cpp", "src/codec/SkBmpMaskCodec.cpp", "src/codec/SkBmpRLECodec.cpp", "src/codec/SkBmpStandardCodec.cpp", "src/codec/SkCodec.cpp", "src/codec/SkCodecImageGenerator.cpp", + "src/codec/SkGifCodec.cpp", "src/codec/SkIcoCodec.cpp", "src/codec/SkJpegCodec.cpp", "src/codec/SkJpegDecoderMgr.cpp", @@ -181,9 +195,12 @@ component("skia") { "src/codec/SkMaskSwizzler.cpp", "src/codec/SkMasks.cpp", "src/codec/SkPngCodec.cpp", + "src/codec/SkSampledCodec.cpp", "src/codec/SkSampler.cpp", "src/codec/SkSwizzler.cpp", "src/codec/SkWbmpCodec.cpp", + "src/codec/SkWebpAdapterCodec.cpp", + "src/codec/SkWebpCodec.cpp", "src/images/SkImageEncoder.cpp", "src/images/SkImageEncoder_Factory.cpp", "src/ports/SkDiscardableMemory_none.cpp", @@ -193,7 +210,12 @@ component("skia") { "src/ports/SkOSFile_stdio.cpp", "src/sfnt/SkOTTable_name.cpp", "src/sfnt/SkOTUtils.cpp", + "src/svg/SkSVGCanvas.cpp", + "src/svg/SkSVGDevice.cpp", "src/utils/mac/SkStream_mac.cpp", + "src/xml/SkDOM.cpp", + "src/xml/SkXMLParser.cpp", + "src/xml/SkXMLWriter.cpp", "third_party/etc1/etc1.cpp", "third_party/ktx/ktx.cpp", ] @@ -210,12 +232,14 @@ component("skia") { "src/ports/SkScalerContext_win_dw.cpp", "src/ports/SkTLS_win.cpp", "src/ports/SkTypeface_win_dw.cpp", + "src/xps/SkDocument_XPS.cpp", ] } else { sources += [ "src/ports/SkDebug_stdio.cpp", "src/ports/SkOSFile_posix.cpp", "src/ports/SkTLS_pthread.cpp", + "src/xps/SkDocument_XPS_None.cpp", ] } @@ -276,3 +300,124 @@ executable("fiddle") { ":skia.h", ] } + +template("test_lib") { + config(target_name + "_config") { + include_dirs = invoker.public_include_dirs + } + source_set(target_name) { + forward_variables_from(invoker, "*", [ "public_include_dirs" ]) + public_configs = [ + ":" + target_name + "_config", + ":skia_private", + ] + + if (!defined(deps)) { + deps = [] + } + deps += [ ":skia" ] + testonly = true + } +} + +test_lib("gpu_tool_utils") { + public_include_dirs = [ "tools/gpu" ] + sources = [ + "tools/gpu/GrContextFactory.cpp", + "tools/gpu/GrTest.cpp", + "tools/gpu/TestContext.cpp", + "tools/gpu/gl/GLTestContext.cpp", + "tools/gpu/gl/debug/DebugGLTestContext.cpp", + "tools/gpu/gl/debug/GrBufferObj.cpp", + "tools/gpu/gl/debug/GrFrameBufferObj.cpp", + "tools/gpu/gl/debug/GrProgramObj.cpp", + "tools/gpu/gl/debug/GrShaderObj.cpp", + "tools/gpu/gl/debug/GrTextureObj.cpp", + "tools/gpu/gl/debug/GrTextureUnitObj.cpp", + "tools/gpu/gl/null/NullGLTestContext.cpp", + ] + libs = [] + + if (is_linux) { + sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] + libs += [ + "GL", + "GLU", + "X11", + ] + } else if (is_mac) { + sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] + libs += [ "OpenGL.framework" ] + } +} + +test_lib("flags") { + public_include_dirs = [ "tools/flags" ] + sources = [ + "tools/flags/SkCommandLineFlags.cpp", + "tools/flags/SkCommonFlags.cpp", + "tools/flags/SkCommonFlagsConfig.cpp", + ] + deps = [ + ":gpu_tool_utils", + ] +} + +test_lib("tool_utils") { + public_include_dirs = [ + "tools", + "tools/timer", + ] + sources = [ + "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools? + "tools/ProcStats.cpp", + "tools/Resources.cpp", + "tools/picture_utils.cpp", + "tools/random_parse_path.cpp", + "tools/sk_tool_utils.cpp", + "tools/sk_tool_utils_font.cpp", + "tools/timer/Timer.cpp", + ] + deps = [ + ":flags", + ] +} + +gm_sources = exec_script("gyp/find.py", + [ + rebase_path("gm"), + "*.c*", + ], + "list lines", + []) +test_lib("gm") { + public_include_dirs = [ "gm" ] + sources = gm_sources + deps = [ + ":gpu_tool_utils", + ":skia", + ":tool_utils", + ] +} + +executable("dm") { + sources = [ + "dm/DM.cpp", + "dm/DMJsonWriter.cpp", + "dm/DMSrcSink.cpp", + + # TODO: tests for real + "tests/Test.cpp", + ] + include_dirs = [ "tests" ] + deps = [ + ":flags", + ":gm", + ":gpu_tool_utils", + ":skia", + ":tool_utils", + "//third_party/jsoncpp", + "//third_party/libpng", + ] + testonly = true +} @@ -5,7 +5,6 @@ * found in the LICENSE file. */ -#include "CrashHandler.h" #include "DMJsonWriter.h" #include "DMSrcSink.h" #include "DMSrcSinkAndroid.h" diff --git a/gyp/tools.gyp b/gyp/tools.gyp index cfcc183529..7b936171fd 100644 --- a/gyp/tools.gyp +++ b/gyp/tools.gyp @@ -435,6 +435,9 @@ 'direct_dependent_settings': { 'include_dirs': [ '../tools', ], }, + 'dependencies': [ + 'skia_lib.gyp:skia_lib', + ], }, { 'target_name': 'url_data_manager', diff --git a/third_party/expat/BUILD.gn b/third_party/expat/BUILD.gn new file mode 100644 index 0000000000..ab20ca6761 --- /dev/null +++ b/third_party/expat/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright 2016 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { +} + +import("../third_party.gni") + +third_party("expat") { + public_include_dirs = [ "../externals/expat" ] + + defines = [ "HAVE_MEMMOVE" ] + + sources = [ + "../externals/expat/lib/xmlparse.c", + "../externals/expat/lib/xmlrole.c", + "../externals/expat/lib/xmltok.c", + ] +} diff --git a/third_party/giflib/BUILD.gn b/third_party/giflib/BUILD.gn new file mode 100644 index 0000000000..96414a93a6 --- /dev/null +++ b/third_party/giflib/BUILD.gn @@ -0,0 +1,19 @@ +# Copyright 2016 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { +} + +import("../third_party.gni") + +third_party("giflib") { + public_include_dirs = [ "../externals/giflib" ] + + sources = [ + "../externals/giflib/dgif_lib.c", + "../externals/giflib/gif_err.c", + "../externals/giflib/gifalloc.c", + ] +} diff --git a/third_party/jsoncpp/BUILD.gn b/third_party/jsoncpp/BUILD.gn new file mode 100644 index 0000000000..4122692dcf --- /dev/null +++ b/third_party/jsoncpp/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright 2016 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { +} + +import("../third_party.gni") + +third_party("jsoncpp") { + public_include_dirs = [ "../externals/jsoncpp/include" ] + + defines = [ "JSON_USE_EXCEPTION=0" ] + sources = [ + "../externals/jsoncpp/src/lib_json/json_reader.cpp", + "../externals/jsoncpp/src/lib_json/json_value.cpp", + "../externals/jsoncpp/src/lib_json/json_writer.cpp", + ] + testonly = true +} diff --git a/third_party/libjpeg_turbo/BUILD.gn b/third_party/libjpeg_turbo/BUILD.gn index f03bca70d5..726641235f 100644 --- a/third_party/libjpeg_turbo/BUILD.gn +++ b/third_party/libjpeg_turbo/BUILD.gn @@ -8,11 +8,8 @@ declare_args() { import("../third_party.gni") -config("libjpeg_turbo_config") { - include_dirs = [ "../externals/libjpeg-turbo" ] -} third_party("libjpeg_turbo") { - public_configs = [ ":libjpeg_turbo_config" ] + public_include_dirs = [ "../externals/libjpeg-turbo" ] sources = [ "../externals/libjpeg-turbo/jcapimin.c", diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn index fd80aad3b9..76c00277b6 100644 --- a/third_party/libpng/BUILD.gn +++ b/third_party/libpng/BUILD.gn @@ -8,11 +8,8 @@ declare_args() { import("../third_party.gni") -config("libpng_public") { - include_dirs = [ "." ] -} third_party("libpng") { - public_configs = [ ":libpng_public" ] + public_include_dirs = [ "." ] deps = [ "//third_party/zlib", diff --git a/third_party/libwebp/BUILD.gn b/third_party/libwebp/BUILD.gn new file mode 100644 index 0000000000..99bf5469c6 --- /dev/null +++ b/third_party/libwebp/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright 2016 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { +} + +import("../third_party.gni") + +third_party("libwebp") { + public_include_dirs = [ "../externals/libwebp" ] + + sources = [ + "../externals/libwebp/src/dec/alpha.c", + "../externals/libwebp/src/dec/buffer.c", + "../externals/libwebp/src/dec/frame.c", + "../externals/libwebp/src/dec/idec.c", + "../externals/libwebp/src/dec/io.c", + "../externals/libwebp/src/dec/quant.c", + "../externals/libwebp/src/dec/tree.c", + "../externals/libwebp/src/dec/vp8.c", + "../externals/libwebp/src/dec/vp8l.c", + "../externals/libwebp/src/dec/webp.c", + "../externals/libwebp/src/demux/demux.c", + "../externals/libwebp/src/dsp/alpha_processing.c", + "../externals/libwebp/src/dsp/alpha_processing_sse2.c", + "../externals/libwebp/src/dsp/alpha_processing_sse41.c", + "../externals/libwebp/src/dsp/cpu.c", + "../externals/libwebp/src/dsp/dec.c", + "../externals/libwebp/src/dsp/dec_clip_tables.c", + "../externals/libwebp/src/dsp/dec_sse2.c", + "../externals/libwebp/src/dsp/dec_sse41.c", + "../externals/libwebp/src/dsp/enc.c", + "../externals/libwebp/src/dsp/enc_sse2.c", + "../externals/libwebp/src/dsp/filters.c", + "../externals/libwebp/src/dsp/filters_sse2.c", + "../externals/libwebp/src/dsp/lossless.c", + "../externals/libwebp/src/dsp/lossless_sse2.c", + "../externals/libwebp/src/dsp/rescaler.c", + "../externals/libwebp/src/dsp/rescaler_sse2.c", + "../externals/libwebp/src/dsp/upsampling.c", + "../externals/libwebp/src/dsp/upsampling_sse2.c", + "../externals/libwebp/src/dsp/yuv.c", + "../externals/libwebp/src/dsp/yuv_sse2.c", + "../externals/libwebp/src/utils/bit_reader.c", + "../externals/libwebp/src/utils/bit_writer.c", + "../externals/libwebp/src/utils/color_cache.c", + "../externals/libwebp/src/utils/filters.c", + "../externals/libwebp/src/utils/huffman.c", + "../externals/libwebp/src/utils/huffman_encode.c", + "../externals/libwebp/src/utils/quant_levels.c", + "../externals/libwebp/src/utils/quant_levels_dec.c", + "../externals/libwebp/src/utils/random.c", + "../externals/libwebp/src/utils/rescaler.c", + "../externals/libwebp/src/utils/thread.c", + "../externals/libwebp/src/utils/utils.c", + ] +} diff --git a/third_party/third_party.gni b/third_party/third_party.gni index d2583a9b7d..9e552bf5a0 100644 --- a/third_party/third_party.gni +++ b/third_party/third_party.gni @@ -4,8 +4,12 @@ # found in the LICENSE file. template("third_party") { + config(target_name + "_public") { + include_dirs = invoker.public_include_dirs + } source_set(target_name) { - forward_variables_from(invoker, "*") + forward_variables_from(invoker, "*", [ "public_include_dirs" ]) + public_configs = [ ":" + target_name + "_public" ] # Warnings are just noise if we're not maintaining the code. cflags = [ "-w" ] diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn index 6338dba278..8909ea50f1 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn @@ -8,11 +8,8 @@ declare_args() { import("../third_party.gni") -config("zlib_public") { - include_dirs = [ "../externals/zlib" ] -} third_party("zlib") { - public_configs = [ ":zlib_public" ] + public_include_dirs = [ "../externals/zlib" ] sources = [ "../externals/zlib/adler32.c", diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp index a772db4226..9c09b5e9b0 100644 --- a/tools/ProcStats.cpp +++ b/tools/ProcStats.cpp @@ -6,6 +6,7 @@ */ #include "ProcStats.h" +#include "SkTypes.h" #if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) || defined(SK_BUILD_FOR_ANDROID) #include <sys/resource.h> |