2016-01-13 18:45:19 +00:00
|
|
|
################################################################################
|
|
|
|
# Skylark macros
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
is_bazel = not hasattr(native, "genmpm")
|
|
|
|
|
|
|
|
def portable_select(select_dict, bazel_condition, default_condition):
|
|
|
|
"""Replaces select() with a Bazel-friendly wrapper.
|
|
|
|
|
|
|
|
Args:
|
|
|
|
select_dict: Dictionary in the same format as select().
|
|
|
|
Returns:
|
|
|
|
If Blaze platform, returns select() using select_dict.
|
|
|
|
If Bazel platform, returns dependencies for condition
|
|
|
|
bazel_condition, or empty list if none specified.
|
|
|
|
"""
|
|
|
|
if is_bazel:
|
|
|
|
return select_dict.get(bazel_condition, select_dict[default_condition])
|
|
|
|
else:
|
|
|
|
return select(select_dict)
|
|
|
|
|
|
|
|
def skia_select(conditions, results):
|
|
|
|
"""Replaces select() for conditions [UNIX, ANDROID, IOS]
|
|
|
|
|
|
|
|
Args:
|
|
|
|
conditions: [CONDITION_UNIX, CONDITION_ANDROID, CONDITION_IOS]
|
|
|
|
results: [RESULT_UNIX, RESULT_ANDROID, RESULT_IOS]
|
|
|
|
Returns:
|
|
|
|
The result matching the platform condition.
|
|
|
|
"""
|
|
|
|
if len(conditions) != 3 or len(results) != 3:
|
|
|
|
fail("Must provide exactly 3 conditions and 3 results")
|
|
|
|
|
|
|
|
selector = {}
|
|
|
|
for i in range(3):
|
|
|
|
selector[conditions[i]] = results[i]
|
|
|
|
return portable_select(selector, conditions[2], conditions[0])
|
|
|
|
|
|
|
|
def skia_glob(srcs):
|
|
|
|
"""Replaces glob() with a version that accepts a struct.
|
|
|
|
|
|
|
|
Args:
|
|
|
|
srcs: struct(include=[], exclude=[])
|
|
|
|
Returns:
|
|
|
|
Equivalent of glob(srcs.include, exclude=srcs.exclude)
|
|
|
|
"""
|
|
|
|
if hasattr(srcs, 'include'):
|
|
|
|
if hasattr(srcs, 'exclude'):
|
|
|
|
return native.glob(srcs.include, exclude=srcs.exclude)
|
|
|
|
else:
|
|
|
|
return native.glob(srcs.include)
|
|
|
|
return []
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## BASE_SRCS
|
|
|
|
################################################################################
|
2015-08-17 19:58:10 +00:00
|
|
|
|
2015-11-18 21:26:10 +00:00
|
|
|
# All platform-independent SRCS.
|
2016-01-13 18:45:19 +00:00
|
|
|
BASE_SRCS_ALL = struct(
|
|
|
|
include = [
|
2015-08-18 15:51:49 +00:00
|
|
|
"include/private/*.h",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/**/*.h",
|
|
|
|
"src/**/*.cpp",
|
2015-08-17 19:58:10 +00:00
|
|
|
|
2015-08-18 15:51:49 +00:00
|
|
|
# Third Party
|
2015-08-17 19:58:10 +00:00
|
|
|
"third_party/etc1/*.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
"third_party/etc1/*.h",
|
2015-08-17 19:58:10 +00:00
|
|
|
"third_party/ktx/*.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
"third_party/ktx/*.h",
|
2015-08-17 19:58:10 +00:00
|
|
|
],
|
|
|
|
exclude = [
|
2015-10-15 15:09:44 +00:00
|
|
|
# Exclude platform-dependent files.
|
2016-01-25 19:24:57 +00:00
|
|
|
"src/android/*",
|
2016-01-07 15:11:39 +00:00
|
|
|
"src/codec/*",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/device/xps/*", # Windows-only. Move to ports?
|
|
|
|
"src/doc/*_XPS.cpp", # Windows-only. Move to ports?
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/fonts/SkFontMgr_fontconfig.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/gpu/gl/android/*",
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/gpu/gl/egl/*",
|
|
|
|
"src/gpu/gl/glx/*",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/gpu/gl/iOS/*",
|
|
|
|
"src/gpu/gl/mac/*",
|
|
|
|
"src/gpu/gl/win/*",
|
2016-01-07 15:11:39 +00:00
|
|
|
"src/images/*",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/opts/**/*",
|
|
|
|
"src/ports/**/*",
|
|
|
|
"src/utils/android/**/*",
|
|
|
|
"src/utils/mac/**/*",
|
|
|
|
"src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports?
|
|
|
|
"src/utils/win/**/*",
|
|
|
|
"src/views/sdl/*",
|
|
|
|
"src/views/win/*",
|
|
|
|
"src/views/unix/*",
|
|
|
|
|
|
|
|
# Exclude multiple definitions.
|
|
|
|
# TODO(mtklein): Move to opts?
|
2015-08-18 15:51:49 +00:00
|
|
|
"src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp.
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
|
|
|
|
"src/gpu/gl/GrGLDefaultInterface_native.cpp",
|
2016-02-17 20:47:27 +00:00
|
|
|
"src/gpu/gl/GrGLDefaultInterface_none.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
|
|
|
|
# Exclude files that don't compile with the current DEFINES.
|
|
|
|
"src/gpu/gl/angle/*", # Requires SK_ANGLE define.
|
|
|
|
"src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE'
|
|
|
|
"src/gpu/gl/mesa/*", # Requires SK_MESA define.
|
|
|
|
"src/svg/parser/*", # Missing SkSVG.h.
|
|
|
|
|
2015-11-18 21:26:10 +00:00
|
|
|
# Conflicting dependencies among Lua versions. See cl/107087297.
|
|
|
|
"src/utils/SkLua*",
|
|
|
|
|
2015-10-15 15:09:44 +00:00
|
|
|
# Not used.
|
|
|
|
"src/animator/**/*",
|
|
|
|
"src/views/**/*",
|
|
|
|
"src/xml/SkBML_Verbs.h",
|
|
|
|
"src/xml/SkBML_XMLParser.cpp",
|
|
|
|
"src/xml/SkXMLPullParser.cpp",
|
2016-02-22 18:07:54 +00:00
|
|
|
|
|
|
|
# Currently exclude all vulkan specific files
|
|
|
|
"src/gpu/vk/*",
|
2015-10-15 15:09:44 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Platform-dependent SRCS for google3-default platform.
|
2016-01-13 18:45:19 +00:00
|
|
|
BASE_SRCS_UNIX = struct(
|
|
|
|
include = [
|
2016-01-25 19:24:57 +00:00
|
|
|
"src/android/*",
|
2016-01-07 15:11:39 +00:00
|
|
|
"src/codec/*",
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/fonts/SkFontMgr_fontconfig.cpp",
|
2016-02-17 20:47:27 +00:00
|
|
|
"src/gpu/gl/GrGLDefaultInterface_none.cpp",
|
2016-01-07 15:11:39 +00:00
|
|
|
"src/images/*",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/opts/**/*.cpp",
|
|
|
|
"src/opts/**/*.h",
|
|
|
|
"src/ports/**/*.cpp",
|
|
|
|
"src/ports/**/*.h",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/opts/*arm*",
|
|
|
|
"src/opts/*mips*",
|
|
|
|
"src/opts/*NEON*",
|
|
|
|
"src/opts/*neon*",
|
2015-10-26 17:46:25 +00:00
|
|
|
# Included in :opts_ssse3 library.
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/opts/*SSSE3*",
|
|
|
|
"src/opts/*ssse3*",
|
2015-10-26 17:46:25 +00:00
|
|
|
# Included in :opts_sse4 library.
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/opts/*SSE4*",
|
|
|
|
"src/opts/*sse4*",
|
2015-12-17 18:18:04 +00:00
|
|
|
# Included in :opts_avx or :opts_avx2
|
|
|
|
"src/opts/*avx*",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/opts/SkBitmapProcState_opts_none.cpp",
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/opts/SkBlitMask_opts_none.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/opts/SkBlitRow_opts_none.cpp",
|
2016-03-10 15:15:59 +00:00
|
|
|
"src/ports/*CG*",
|
2016-03-10 16:52:05 +00:00
|
|
|
"src/ports/*android*",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/ports/*chromium*",
|
|
|
|
"src/ports/*mac*",
|
|
|
|
"src/ports/*mozalloc*",
|
|
|
|
"src/ports/*nacl*",
|
|
|
|
"src/ports/*win*",
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/ports/SkFontConfigInterface_direct_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_custom_directory_factory.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/ports/SkFontMgr_custom_embedded_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_empty_factory.cpp",
|
2015-12-03 13:04:03 +00:00
|
|
|
"src/ports/SkFontMgr_fontconfig.cpp",
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/ports/SkFontMgr_fontconfig_factory.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/ports/SkImageDecoder_WIC.cpp",
|
|
|
|
"src/ports/SkImageDecoder_empty.cpp",
|
|
|
|
"src/ports/SkImageGenerator_none.cpp",
|
|
|
|
"src/ports/SkTLS_none.cpp",
|
2015-08-18 15:51:49 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2015-10-26 17:46:25 +00:00
|
|
|
# Platform-dependent SRCS for google3-default Android.
|
2016-01-13 18:45:19 +00:00
|
|
|
BASE_SRCS_ANDROID = struct(
|
|
|
|
include = [
|
2016-01-25 19:24:57 +00:00
|
|
|
"src/android/*",
|
2016-01-07 15:11:39 +00:00
|
|
|
"src/codec/*",
|
2016-02-17 20:47:27 +00:00
|
|
|
"src/gpu/gl/GrGLDefaultInterface_none.cpp",
|
2016-01-07 15:11:39 +00:00
|
|
|
"src/images/*",
|
2015-10-26 17:46:25 +00:00
|
|
|
# TODO(benjaminwagner): Figure out how to compile with EGL.
|
|
|
|
"src/opts/**/*.cpp",
|
|
|
|
"src/opts/**/*.h",
|
|
|
|
"src/ports/**/*.cpp",
|
|
|
|
"src/ports/**/*.h",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/opts/*mips*",
|
|
|
|
"src/opts/*SSE2*",
|
|
|
|
"src/opts/*SSSE3*",
|
|
|
|
"src/opts/*ssse3*",
|
|
|
|
"src/opts/*SSE4*",
|
|
|
|
"src/opts/*sse4*",
|
2015-12-17 18:18:04 +00:00
|
|
|
"src/opts/*avx*",
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/opts/*x86*",
|
|
|
|
"src/opts/SkBitmapProcState_opts_none.cpp",
|
|
|
|
"src/opts/SkBlitMask_opts_none.cpp",
|
|
|
|
"src/opts/SkBlitRow_opts_none.cpp",
|
2016-03-10 15:15:59 +00:00
|
|
|
"src/ports/*CG*",
|
2016-03-10 16:52:05 +00:00
|
|
|
"src/ports/*FontConfig*",
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/ports/*chromium*",
|
|
|
|
"src/ports/*fontconfig*",
|
|
|
|
"src/ports/*mac*",
|
|
|
|
"src/ports/*mozalloc*",
|
|
|
|
"src/ports/*nacl*",
|
|
|
|
"src/ports/*win*",
|
|
|
|
"src/ports/SkDebug_stdio.cpp",
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/ports/SkFontConfigInterface_direct_factory.cpp",
|
|
|
|
"src/ports/SkFontConfigInterface_direct_google3_factory.cpp",
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/ports/SkFontMgr_custom_directory_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_custom_embedded_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_empty_factory.cpp",
|
|
|
|
"src/ports/SkImageDecoder_WIC.cpp",
|
|
|
|
"src/ports/SkImageDecoder_empty.cpp",
|
|
|
|
"src/ports/SkImageGenerator_none.cpp",
|
|
|
|
"src/ports/SkTLS_none.cpp",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2015-11-02 19:11:21 +00:00
|
|
|
# Platform-dependent SRCS for google3-default iOS.
|
2016-01-13 18:45:19 +00:00
|
|
|
BASE_SRCS_IOS = struct(
|
|
|
|
include = [
|
2016-02-17 22:14:25 +00:00
|
|
|
"src/android/*",
|
|
|
|
"src/codec/*",
|
2016-02-17 20:47:27 +00:00
|
|
|
"src/gpu/gl/GrGLDefaultInterface_native.cpp",
|
|
|
|
"src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp",
|
2015-11-02 19:11:21 +00:00
|
|
|
"src/opts/**/*.cpp",
|
|
|
|
"src/opts/**/*.h",
|
|
|
|
"src/ports/**/*.cpp",
|
|
|
|
"src/ports/**/*.h",
|
2016-02-17 03:17:01 +00:00
|
|
|
"src/utils/mac/*.cpp",
|
2015-11-02 19:11:21 +00:00
|
|
|
],
|
|
|
|
exclude = [
|
2016-02-17 22:14:25 +00:00
|
|
|
"src/codec/*Gif*.cpp",
|
|
|
|
"src/codec/*Ico*.cpp",
|
|
|
|
"src/codec/*Jpeg*.cpp",
|
|
|
|
"src/codec/*Webp*.cpp",
|
|
|
|
"src/codec/*Png*",
|
|
|
|
"src/codec/*Raw*.cpp",
|
2015-11-02 19:11:21 +00:00
|
|
|
"src/opts/*mips*",
|
|
|
|
"src/opts/*NEON*",
|
|
|
|
"src/opts/*neon*",
|
|
|
|
"src/opts/*SSE2*",
|
|
|
|
"src/opts/*SSSE3*",
|
|
|
|
"src/opts/*ssse3*",
|
|
|
|
"src/opts/*SSE4*",
|
|
|
|
"src/opts/*sse4*",
|
2015-12-17 18:18:04 +00:00
|
|
|
"src/opts/*avx*",
|
2015-11-02 19:11:21 +00:00
|
|
|
"src/opts/*x86*",
|
|
|
|
"src/opts/SkBitmapProcState_opts_none.cpp",
|
2016-01-25 19:24:57 +00:00
|
|
|
"src/opts/SkBlitMask_opts_arm*.cpp",
|
|
|
|
"src/opts/SkBlitRow_opts_arm*.cpp",
|
2016-03-10 16:52:05 +00:00
|
|
|
"src/ports/*CG*",
|
|
|
|
"src/ports/*FontConfig*",
|
|
|
|
"src/ports/*FreeType*",
|
2015-11-02 19:11:21 +00:00
|
|
|
"src/ports/*android*",
|
|
|
|
"src/ports/*chromium*",
|
|
|
|
"src/ports/*fontconfig*",
|
|
|
|
"src/ports/*mozalloc*",
|
|
|
|
"src/ports/*nacl*",
|
|
|
|
"src/ports/*win*",
|
|
|
|
"src/ports/SkFontMgr_custom.cpp",
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/ports/SkFontConfigInterface_direct_factory.cpp",
|
|
|
|
"src/ports/SkFontConfigInterface_direct_google3_factory.cpp",
|
2015-11-02 19:11:21 +00:00
|
|
|
"src/ports/SkFontMgr_custom_directory_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_custom_embedded_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_empty_factory.cpp",
|
|
|
|
"src/ports/SkImageDecoder_WIC.cpp",
|
|
|
|
"src/ports/SkImageGenerator_none.cpp",
|
|
|
|
"src/ports/SkTLS_none.cpp",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
################################################################################
|
|
|
|
## SSSE3/SSE4/AVX/AVX2 SRCS
|
|
|
|
################################################################################
|
2015-10-26 17:46:25 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
SSSE3_SRCS = struct(
|
|
|
|
include = [
|
2015-08-18 15:51:49 +00:00
|
|
|
"src/opts/*SSSE3*.cpp",
|
|
|
|
"src/opts/*ssse3*.cpp",
|
2016-01-25 17:29:08 +00:00
|
|
|
],
|
|
|
|
)
|
2015-08-18 15:51:49 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
SSE4_SRCS = struct(
|
|
|
|
include = [
|
2015-08-18 15:51:49 +00:00
|
|
|
"src/opts/*SSE4*.cpp",
|
|
|
|
"src/opts/*sse4*.cpp",
|
2016-01-25 17:29:08 +00:00
|
|
|
],
|
|
|
|
)
|
2015-08-17 19:58:10 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
AVX_SRCS = struct(
|
|
|
|
include = [
|
2015-12-17 18:18:04 +00:00
|
|
|
"src/opts/*_avx.cpp",
|
2016-01-25 17:29:08 +00:00
|
|
|
],
|
|
|
|
)
|
2015-12-17 18:18:04 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
AVX2_SRCS = struct(
|
|
|
|
include = [
|
2015-12-17 18:18:04 +00:00
|
|
|
"src/opts/*_avx2.cpp",
|
2016-01-25 17:29:08 +00:00
|
|
|
],
|
|
|
|
)
|
2016-01-13 18:45:19 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## BASE_HDRS
|
|
|
|
################################################################################
|
2015-12-17 18:18:04 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
BASE_HDRS = struct(
|
|
|
|
include = [
|
2015-08-17 19:58:10 +00:00
|
|
|
"include/**/*.h",
|
2016-01-25 19:24:57 +00:00
|
|
|
"src/utils/SkWhitelistChecksums.cpp",
|
2015-08-17 19:58:10 +00:00
|
|
|
],
|
2015-08-18 15:51:49 +00:00
|
|
|
exclude = [
|
2015-10-15 15:09:44 +00:00
|
|
|
"include/private/**/*",
|
|
|
|
|
|
|
|
# Not used.
|
|
|
|
"include/animator/**/*",
|
|
|
|
"include/views/**/*",
|
|
|
|
"include/xml/SkBML_WXMLParser.h",
|
|
|
|
"include/xml/SkBML_XMLParser.h",
|
2016-01-25 17:29:08 +00:00
|
|
|
],
|
|
|
|
)
|
2016-01-13 18:45:19 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## BASE_DEPS
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
BASE_DEPS_ALL = []
|
2015-08-17 19:58:10 +00:00
|
|
|
|
2015-11-18 21:26:10 +00:00
|
|
|
BASE_DEPS_UNIX = [
|
2016-01-12 22:22:24 +00:00
|
|
|
":opts_ssse3",
|
2016-01-13 18:45:19 +00:00
|
|
|
":opts_sse4",
|
|
|
|
":opts_avx",
|
|
|
|
":opts_avx2",
|
2015-11-18 21:26:10 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
BASE_DEPS_ANDROID = []
|
|
|
|
|
|
|
|
BASE_DEPS_IOS = []
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
################################################################################
|
|
|
|
## INCLUDES
|
|
|
|
################################################################################
|
2015-11-18 21:26:10 +00:00
|
|
|
|
2015-08-17 19:58:10 +00:00
|
|
|
# Includes needed by Skia implementation. Not public includes.
|
|
|
|
INCLUDES = [
|
2015-11-13 20:27:08 +00:00
|
|
|
"include/android",
|
2015-08-17 19:58:10 +00:00
|
|
|
"include/c",
|
2016-02-01 12:54:14 +00:00
|
|
|
"include/client/android",
|
2015-08-17 19:58:10 +00:00
|
|
|
"include/codec",
|
|
|
|
"include/config",
|
|
|
|
"include/core",
|
|
|
|
"include/effects",
|
|
|
|
"include/gpu",
|
|
|
|
"include/images",
|
|
|
|
"include/pathops",
|
|
|
|
"include/pipe",
|
|
|
|
"include/ports",
|
|
|
|
"include/private",
|
|
|
|
"include/utils",
|
2015-11-02 19:11:21 +00:00
|
|
|
"include/utils/mac",
|
|
|
|
"include/utils/win",
|
2015-10-15 15:09:44 +00:00
|
|
|
"include/svg",
|
2015-08-17 19:58:10 +00:00
|
|
|
"include/xml",
|
2015-11-13 20:27:08 +00:00
|
|
|
"src/codec",
|
2015-08-17 19:58:10 +00:00
|
|
|
"src/core",
|
|
|
|
"src/gpu",
|
|
|
|
"src/image",
|
|
|
|
"src/lazy",
|
|
|
|
"src/opts",
|
2015-12-01 19:12:05 +00:00
|
|
|
"src/ports",
|
2015-08-17 19:58:10 +00:00
|
|
|
"src/pdf",
|
|
|
|
"src/sfnt",
|
|
|
|
"src/utils",
|
|
|
|
"third_party/etc1",
|
|
|
|
"third_party/ktx",
|
2016-01-13 18:45:19 +00:00
|
|
|
]
|
2015-08-17 19:58:10 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
################################################################################
|
|
|
|
## DM_SRCS
|
|
|
|
################################################################################
|
2015-10-26 17:46:25 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
DM_SRCS_ALL = struct(
|
|
|
|
include = [
|
2015-10-15 15:09:44 +00:00
|
|
|
"dm/*.cpp",
|
|
|
|
"dm/*.h",
|
|
|
|
"gm/*.c",
|
|
|
|
"gm/*.cpp",
|
|
|
|
"gm/*.h",
|
|
|
|
"tests/*.cpp",
|
|
|
|
"tests/*.h",
|
|
|
|
"tools/CrashHandler.cpp",
|
|
|
|
"tools/CrashHandler.h",
|
|
|
|
"tools/ProcStats.cpp",
|
|
|
|
"tools/ProcStats.h",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/Resources.h",
|
2015-10-24 14:55:31 +00:00
|
|
|
"tools/SkBitmapRegionCanvas.cpp",
|
|
|
|
"tools/SkBitmapRegionCanvas.h",
|
|
|
|
"tools/SkBitmapRegionCodec.cpp",
|
|
|
|
"tools/SkBitmapRegionCodec.h",
|
2015-11-06 16:56:32 +00:00
|
|
|
"tools/SkBitmapRegionDecoder.cpp",
|
|
|
|
"tools/SkBitmapRegionDecoder.h",
|
2015-10-15 15:09:44 +00:00
|
|
|
"tools/SkBitmapRegionSampler.cpp",
|
|
|
|
"tools/SkBitmapRegionSampler.h",
|
|
|
|
"tools/flags/*.cpp",
|
|
|
|
"tools/flags/*.h",
|
2016-02-09 20:32:52 +00:00
|
|
|
"tools/random_parse_path.cpp",
|
|
|
|
"tools/random_parse_path.h",
|
2015-10-15 15:09:44 +00:00
|
|
|
"tools/sk_tool_utils.cpp",
|
|
|
|
"tools/sk_tool_utils.h",
|
2015-10-24 14:55:31 +00:00
|
|
|
"tools/sk_tool_utils_font.cpp",
|
|
|
|
"tools/timer/*.cpp",
|
|
|
|
"tools/timer/*.h",
|
2015-10-15 15:09:44 +00:00
|
|
|
],
|
|
|
|
exclude = [
|
2015-10-26 17:46:25 +00:00
|
|
|
"dm/DMSrcSinkAndroid.cpp", # Android-only.
|
|
|
|
"tests/FontMgrAndroidParserTest.cpp", # Android-only.
|
|
|
|
"tests/PathOpsSkpClipTest.cpp", # Alternate main.
|
2015-10-15 15:09:44 +00:00
|
|
|
"tests/skia_test.cpp", # Old main.
|
|
|
|
"tests/SkpSkGrTest.cpp", # Alternate main.
|
|
|
|
"tools/timer/SysTimer_mach.cpp",
|
2015-10-26 17:46:25 +00:00
|
|
|
"tools/timer/SysTimer_windows.cpp",
|
2015-10-15 15:09:44 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
DM_SRCS_UNIX = struct()
|
2015-10-26 17:46:25 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
DM_SRCS_ANDROID = struct(
|
|
|
|
include = [
|
2015-10-26 17:46:25 +00:00
|
|
|
# Depends on Android HWUI library that is not available in google3.
|
|
|
|
#"dm/DMSrcSinkAndroid.cpp",
|
|
|
|
"tests/FontMgrAndroidParserTest.cpp",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
DM_SRCS_IOS = struct()
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## DM_INCLUDES
|
|
|
|
################################################################################
|
2015-10-26 17:46:25 +00:00
|
|
|
|
2015-10-15 15:09:44 +00:00
|
|
|
DM_INCLUDES = [
|
2016-02-01 17:05:08 +00:00
|
|
|
"dm",
|
2015-10-15 15:09:44 +00:00
|
|
|
"gm",
|
|
|
|
"src/codec",
|
|
|
|
"src/effects",
|
2016-02-22 21:30:39 +00:00
|
|
|
"src/effects/gradients",
|
2015-10-15 15:09:44 +00:00
|
|
|
"src/fonts",
|
|
|
|
"src/pathops",
|
|
|
|
"src/pipe/utils",
|
2015-10-26 17:46:25 +00:00
|
|
|
"src/ports",
|
2016-02-09 20:44:06 +00:00
|
|
|
"tools/debugger",
|
2015-10-15 15:09:44 +00:00
|
|
|
"tests",
|
|
|
|
"tools",
|
|
|
|
"tools/flags",
|
|
|
|
"tools/timer",
|
|
|
|
]
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
################################################################################
|
|
|
|
## DM_ARGS
|
|
|
|
################################################################################
|
2016-01-12 20:00:49 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
def DM_ARGS(base_dir):
|
|
|
|
return [
|
|
|
|
"--nogpu",
|
|
|
|
"--verbose",
|
|
|
|
# TODO(mtklein): maybe investigate why these fail?
|
2016-02-25 18:28:11 +00:00
|
|
|
"--match ~FontMgr ~Scalar ~Canvas ~Codec_stripes ~Codec_Dimensions ~Codec ~Stream ~skps ~RecordDraw_TextBounds ~PaintBreakText",
|
2016-01-13 18:45:19 +00:00
|
|
|
"--resourcePath %s/resources" % base_dir,
|
|
|
|
"--images %s/resources" % base_dir,
|
|
|
|
]
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## COPTS
|
|
|
|
################################################################################
|
2015-11-02 19:11:21 +00:00
|
|
|
|
2015-10-26 17:46:25 +00:00
|
|
|
COPTS_UNIX = [
|
2015-08-17 19:58:10 +00:00
|
|
|
"-Wno-implicit-fallthrough", # Some intentional fallthrough.
|
2015-10-19 20:55:55 +00:00
|
|
|
"-Wno-deprecated-declarations", # Internal use of deprecated methods. :(
|
2015-08-17 19:58:10 +00:00
|
|
|
]
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
COPTS_ANDROID = ["-mfpu=neon"]
|
|
|
|
|
|
|
|
COPTS_IOS = []
|
|
|
|
|
|
|
|
COPTS_ALL = []
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
## DEFINES
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
DEFINES_UNIX = [
|
2016-02-12 20:35:48 +00:00
|
|
|
"PNG_SKIP_SETJMP_CHECK",
|
2016-01-13 18:45:19 +00:00
|
|
|
"SK_BUILD_FOR_UNIX",
|
|
|
|
"SK_SAMPLES_FOR_X",
|
|
|
|
"SK_SFNTLY_SUBSETTER",
|
2016-02-17 16:26:31 +00:00
|
|
|
"SK_CODEC_DECODES_GIF",
|
|
|
|
"SK_CODEC_DECODES_JPEG",
|
|
|
|
"SK_CODEC_DECODES_PNG",
|
2016-02-12 00:00:24 +00:00
|
|
|
"SK_CODEC_DECODES_RAW",
|
2016-02-17 16:26:31 +00:00
|
|
|
"SK_CODEC_DECODES_WEBP",
|
2016-01-13 18:45:19 +00:00
|
|
|
]
|
2015-10-26 17:46:25 +00:00
|
|
|
|
|
|
|
DEFINES_ANDROID = [
|
|
|
|
"SK_BUILD_FOR_ANDROID",
|
2016-02-17 16:26:31 +00:00
|
|
|
"SK_CODEC_DECODES_GIF",
|
|
|
|
"SK_CODEC_DECODES_JPEG",
|
|
|
|
"SK_CODEC_DECODES_PNG",
|
2016-02-12 00:00:24 +00:00
|
|
|
"SK_CODEC_DECODES_RAW",
|
2016-02-17 16:26:31 +00:00
|
|
|
"SK_CODEC_DECODES_WEBP",
|
2015-10-26 17:46:25 +00:00
|
|
|
]
|
|
|
|
|
2015-11-02 19:11:21 +00:00
|
|
|
DEFINES_IOS = [
|
|
|
|
"SK_BUILD_FOR_IOS",
|
|
|
|
"SK_IGNORE_ETC1_SUPPORT",
|
2016-01-25 19:24:57 +00:00
|
|
|
"SKNX_NO_SIMD",
|
2015-11-02 19:11:21 +00:00
|
|
|
]
|
|
|
|
|
2015-10-26 17:46:25 +00:00
|
|
|
DEFINES_ALL = [
|
2015-08-17 19:58:10 +00:00
|
|
|
# Chrome DEFINES.
|
|
|
|
"SK_USE_FLOATBITS",
|
|
|
|
"SK_USE_FREETYPE_EMBOLDEN",
|
|
|
|
# Turn on a few Google3-specific build fixes.
|
|
|
|
"GOOGLE3",
|
|
|
|
]
|
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
################################################################################
|
|
|
|
## LINKOPTS
|
|
|
|
################################################################################
|
2015-10-26 17:46:25 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
LINKOPTS_UNIX = []
|
2015-12-17 18:18:04 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
LINKOPTS_ANDROID = [
|
|
|
|
"-lEGL",
|
|
|
|
]
|
2015-10-15 15:09:44 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
LINKOPTS_IOS = []
|
2015-10-15 15:09:44 +00:00
|
|
|
|
2016-01-13 18:45:19 +00:00
|
|
|
LINKOPTS_ALL = [
|
|
|
|
"-ldl",
|
|
|
|
]
|