From: benjaminwagner Date: Mon, 26 Oct 2015 17:46:25 +0000 (-0700) Subject: Enable BUILD file compilation of skia and dm with --config=android_arm. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~438 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86ea33e96341ec3de03bcb6aef9a2cfce371df6a;p=platform%2Fupstream%2FlibSkiaSharp.git Enable BUILD file compilation of skia and dm with --config=android_arm. Corresponding google3 cl is 105687529. BUG=skia: Review URL: https://codereview.chromium.org/1414643002 --- diff --git a/BUILD.public b/BUILD.public index 557a313..90526b1 100644 --- a/BUILD.public +++ b/BUILD.public @@ -11,7 +11,6 @@ SRCS = glob( "include/private/*.h", "src/**/*.h", "src/**/*.cpp", - "src/**/*.c", # Third Party "third_party/etc1/*.cpp", @@ -24,6 +23,9 @@ SRCS = glob( "src/device/xps/*", # Windows-only. Move to ports? "src/doc/*_XPS.cpp", # Windows-only. Move to ports? "src/gpu/gl/android/*", + "src/gpu/gl/egl/*", + "src/gpu/gl/glx/*", + "src/gpu/gl/nacl/*", "src/gpu/gl/iOS/*", "src/gpu/gl/mac/*", "src/gpu/gl/win/*", @@ -41,10 +43,9 @@ SRCS = glob( # TODO(mtklein): Move to opts? "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp. "src/fonts/*fontconfig*", - "src/gpu/gl/egl/*", # Conflicts with gpu/gl/glx. - "src/gpu/gl/nacl/*", # Conflicts with gpu/gl/glx. - "src/gpu/gl/GrGLDefaultInterface_none.cpp", # Conflicts with src/gpu/gl/GrGLDefaultInterface_native.cpp - "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", # Conflicts with src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp + "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", + "src/gpu/gl/GrGLDefaultInterface_native.cpp", + "src/gpu/gl/GrGLDefaultInterface_none.cpp", # Exclude files that don't compile with the current DEFINES. "src/gpu/gl/angle/*", # Requires SK_ANGLE define. @@ -62,8 +63,11 @@ SRCS = glob( ) # Platform-dependent SRCS for google3-default platform. -PLATFORM_SRCS = glob( +SRCS_UNIX = glob( [ + "src/gpu/gl/GrGLDefaultInterface_native.cpp", + "src/gpu/gl/glx/**/*.cpp", + "src/gpu/gl/glx/**/*.h", "src/opts/**/*.cpp", "src/opts/**/*.h", "src/ports/**/*.cpp", @@ -74,12 +78,14 @@ PLATFORM_SRCS = glob( "src/opts/*mips*", "src/opts/*NEON*", "src/opts/*neon*", + # Included in :opts_ssse3 library. "src/opts/*SSSE3*", "src/opts/*ssse3*", + # Included in :opts_sse4 library. "src/opts/*SSE4*", "src/opts/*sse4*", - "src/opts/SkBlitMask_opts_none.cpp", "src/opts/SkBitmapProcState_opts_none.cpp", + "src/opts/SkBlitMask_opts_none.cpp", "src/opts/SkBlitRow_opts_none.cpp", "src/ports/*android*", "src/ports/*chromium*", @@ -99,6 +105,52 @@ PLATFORM_SRCS = glob( ], ) +# Platform-dependent SRCS for google3-default Android. +SRCS_ANDROID = glob( + [ + # TODO(benjaminwagner): Figure out how to compile with EGL. + "src/gpu/gl/GrGLDefaultInterface_none.cpp", + "src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp", + "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*", + "src/opts/*x86*", + "src/opts/SkBitmapProcState_opts_none.cpp", + "src/opts/SkBlitMask_opts_none.cpp", + "src/opts/SkBlitRow_opts_none.cpp", + "src/ports/*chromium*", + "src/ports/*CG*", + "src/ports/*fontconfig*", + "src/ports/*FontConfig*", + "src/ports/*mac*", + "src/ports/*mozalloc*", + "src/ports/*nacl*", + "src/ports/*win*", + "src/ports/SkDebug_stdio.cpp", + "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", + ], +) + +PLATFORM_SRCS = select({ + CONDITION_ANDROID: SRCS_ANDROID, + "//conditions:default": SRCS_UNIX, +}) + SRCS_SSSE3 = glob( [ "src/opts/*SSSE3*.cpp", @@ -156,6 +208,19 @@ INCLUDES = [ "third_party/ktx", ] +DEPS_UNIX = [ + ":opts_sse4", + ":opts_ssse3", +] + +DEPS_ANDROID = [] + +DEPS = select({ + CONDITION_ANDROID: DEPS_ANDROID + EXTERNAL_DEPS_ANDROID, + "//conditions:default": DEPS_UNIX + EXTERNAL_DEPS_UNIX, +}) + +# Platform-independent SRCS for DM. DM_SRCS = glob( [ "dm/*.cpp", @@ -190,16 +255,31 @@ DM_SRCS = glob( "tools/timer/*.h", ], exclude = [ + "dm/DMSrcSinkAndroid.cpp", # Android-only. + "tests/FontMgrAndroidParserTest.cpp", # Android-only. + "tests/PathOpsSkpClipTest.cpp", # Alternate main. "tests/skia_test.cpp", # Old main. "tests/SkpSkGrTest.cpp", # Alternate main. - "tests/PathOpsSkpClipTest.cpp", # Alternate main. - "tests/FontMgrAndroidParserTest.cpp", # Android-only. - "dm/DMSrcSinkAndroid.cpp", # Android-only. - "tools/timer/SysTimer_windows.cpp", "tools/timer/SysTimer_mach.cpp", + "tools/timer/SysTimer_windows.cpp", ], ) +DM_SRCS_UNIX = [] + +DM_SRCS_ANDROID = glob( + [ + # Depends on Android HWUI library that is not available in google3. + #"dm/DMSrcSinkAndroid.cpp", + "tests/FontMgrAndroidParserTest.cpp", + ], +) + +DM_PLATFORM_SRCS = select({ + CONDITION_ANDROID: DM_SRCS_ANDROID, + "//conditions:default": DM_SRCS_UNIX, +}) + DM_INCLUDES = [ "gm", "src/codec", @@ -207,6 +287,7 @@ DM_INCLUDES = [ "src/fonts", "src/pathops", "src/pipe/utils", + "src/ports", "src/utils/debugger", "tests", "tools", @@ -214,12 +295,32 @@ DM_INCLUDES = [ "tools/timer", ] -COPTS = [ +COPTS_ANDROID = [ + "-mfpu=neon", +] + +COPTS_UNIX = [ "-Wno-implicit-fallthrough", # Some intentional fallthrough. "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( ] -DEFINES = [ +COPTS = select({ + CONDITION_ANDROID: COPTS_ANDROID, + "//conditions:default": COPTS_UNIX, +}) + +DEFINES_ANDROID = [ + "SK_BUILD_FOR_ANDROID", + # TODO(benjaminwagner): Try to get png library updated? + "SK_PNG_NO_INDEX_SUPPORTED", +] + +DEFINES_UNIX = [ + "SK_BUILD_FOR_UNIX", + "SK_SAMPLES_FOR_X", +] + +DEFINES_ALL = [ # It'd be nice for fastbuild, dbg -> SK_DEBUG, opt -> SK_RELEASE. "SK_RELEASE", # Chrome DEFINES. @@ -227,11 +328,20 @@ DEFINES = [ "SK_USE_FREETYPE_EMBOLDEN", # Turn on a few Google3-specific build fixes. "GOOGLE3", - "SK_BUILD_FOR_UNIX", - "SK_SAMPLES_FOR_X", ] -LINKOPTS = ["-ldl"] +DEFINES = select({ + CONDITION_ANDROID: DEFINES_ANDROID, + "//conditions:default": DEFINES_UNIX, +}) + DEFINES_ALL + +LINKOPTS = select({ + CONDITION_ANDROID: [ + "-ldl", + "-lEGL", + ], + "//conditions:default": ["-ldl"], +}) cc_library( name = "opts_ssse3", @@ -258,16 +368,13 @@ cc_library( includes = INCLUDES, linkopts = LINKOPTS, visibility = [":skia_clients"], - deps = EXTERNAL_DEPS + [ - ":opts_sse4", - ":opts_ssse3", - ], + deps = DEPS, ) cc_test( name = "dm", size = "large", - srcs = DM_SRCS, + srcs = DM_SRCS + DM_PLATFORM_SRCS, args = [ "--nogpu", "--verbose", diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 9cbada8..0d6f318 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -25,9 +25,11 @@ #include "SkUtils.h" #if defined (GOOGLE3) - // #including #defines doesn't work in with this build system. - #include "typography/font/sfntly/src/sample/chromium/font_subsetter.h" - #define SK_SFNTLY_SUBSETTER // For the benefit of #ifdefs below. + #if !defined (SK_BUILD_FOR_ANDROID) + // #including #defines doesn't work with this build system. + #include "typography/font/sfntly/src/sample/chromium/font_subsetter.h" + #define SK_SFNTLY_SUBSETTER // For the benefit of #ifdefs below. + #endif #elif defined (SK_SFNTLY_SUBSETTER) #include SK_SFNTLY_SUBSETTER #endif diff --git a/tools/BUILD.public.expected b/tools/BUILD.public.expected index c8f156f..323d7a9 100644 --- a/tools/BUILD.public.expected +++ b/tools/BUILD.public.expected @@ -1,23 +1,54 @@ This file is auto-generated by tools/BUILD_simulator.py. It expands BUILD.public to make it easy to see changes. -COPTS = ['-Wno-implicit-fallthrough'] -DEFINES = ['SK_RELEASE', +COPTS = ['*** BEGIN //conditions:default ***', + '-Wno-implicit-fallthrough', + '-Wno-deprecated-declarations', + '*** END //conditions:default ***', + '*** BEGIN CONDITION_ANDROID ***', + '-mfpu=neon', + '*** END CONDITION_ANDROID ***'] +COPTS_ANDROID = ['-mfpu=neon'] +COPTS_UNIX = ['-Wno-implicit-fallthrough', '-Wno-deprecated-declarations'] +DEFINES = ['*** BEGIN //conditions:default ***', + 'SK_BUILD_FOR_UNIX', + 'SK_SAMPLES_FOR_X', + '*** END //conditions:default ***', + '*** BEGIN CONDITION_ANDROID ***', + 'SK_BUILD_FOR_ANDROID', + 'SK_PNG_NO_INDEX_SUPPORTED', + '*** END CONDITION_ANDROID ***', + 'SK_RELEASE', 'SK_USE_FLOATBITS', 'SK_USE_FREETYPE_EMBOLDEN', - 'GOOGLE3', - 'SK_BUILD_FOR_UNIX', - 'SK_SAMPLES_FOR_X'] + 'GOOGLE3'] +DEFINES_ALL = ['SK_RELEASE', 'SK_USE_FLOATBITS', 'SK_USE_FREETYPE_EMBOLDEN', 'GOOGLE3'] +DEFINES_ANDROID = ['SK_BUILD_FOR_ANDROID', 'SK_PNG_NO_INDEX_SUPPORTED'] +DEFINES_UNIX = ['SK_BUILD_FOR_UNIX', 'SK_SAMPLES_FOR_X'] +DEPS = ['*** BEGIN //conditions:default ***', + ':opts_sse4', + ':opts_ssse3', + '*** END //conditions:default ***', + '*** BEGIN CONDITION_ANDROID ***', + '*** END CONDITION_ANDROID ***'] +DEPS_ANDROID = [] +DEPS_UNIX = [':opts_sse4', ':opts_ssse3'] DM_INCLUDES = ['gm', 'src/codec', 'src/effects', 'src/fonts', 'src/pathops', 'src/pipe/utils', + 'src/ports', 'src/utils/debugger', 'tests', 'tools', 'tools/flags', 'tools/timer'] +DM_PLATFORM_SRCS = ['*** BEGIN //conditions:default ***', + '*** END //conditions:default ***', + '*** BEGIN CONDITION_ANDROID ***', + 'tests/FontMgrAndroidParserTest.cpp', + '*** END CONDITION_ANDROID ***'] DM_SRCS = ['dm/DM.cpp', 'dm/DMGpuSupport.h', 'dm/DMJsonWriter.cpp', @@ -407,6 +438,7 @@ DM_SRCS = ['dm/DM.cpp', 'tests/PathOpsBuilderTest.cpp', 'tests/PathOpsConicIntersectionTest.cpp', 'tests/PathOpsConicLineIntersectionTest.cpp', + 'tests/PathOpsCubicConicIntersectionTest.cpp', 'tests/PathOpsCubicIntersectionTest.cpp', 'tests/PathOpsCubicIntersectionTestData.cpp', 'tests/PathOpsCubicIntersectionTestData.h', @@ -518,6 +550,7 @@ DM_SRCS = ['dm/DM.cpp', 'tests/TextBlobTest.cpp', 'tests/TextureCompressionTest.cpp', 'tests/Time.cpp', + 'tests/TopoSortTest.cpp', 'tests/TraceMemoryDumpTest.cpp', 'tests/TracingTest.cpp', 'tests/TypefaceTest.cpp', @@ -539,6 +572,8 @@ DM_SRCS = ['dm/DM.cpp', 'tools/Resources.h', 'tools/SkBitmapRegionCanvas.cpp', 'tools/SkBitmapRegionCanvas.h', + 'tools/SkBitmapRegionCodec.cpp', + 'tools/SkBitmapRegionCodec.h', 'tools/SkBitmapRegionDecoderInterface.cpp', 'tools/SkBitmapRegionDecoderInterface.h', 'tools/SkBitmapRegionSampler.cpp', @@ -550,16 +585,10 @@ DM_SRCS = ['dm/DM.cpp', 'tools/sk_tool_utils.cpp', 'tools/sk_tool_utils.h', 'tools/sk_tool_utils_font.cpp', - 'tools/timer/GpuTimer.cpp', - 'tools/timer/GpuTimer.h', - 'tools/timer/SysTimer_mach.h', - 'tools/timer/SysTimer_posix.cpp', - 'tools/timer/SysTimer_posix.h', - 'tools/timer/SysTimer_windows.h', 'tools/timer/Timer.cpp', - 'tools/timer/Timer.h', - 'tools/timer/TimerData.cpp', - 'tools/timer/TimerData.h'] + 'tools/timer/Timer.h'] +DM_SRCS_ANDROID = ['tests/FontMgrAndroidParserTest.cpp'] +DM_SRCS_UNIX = [] HDRS = ['include/c/sk_canvas.h', 'include/c/sk_data.h', 'include/c/sk_image.h', @@ -571,9 +600,9 @@ HDRS = ['include/c/sk_canvas.h', 'include/c/sk_shader.h', 'include/c/sk_surface.h', 'include/c/sk_types.h', + 'include/codec/SkAndroidCodec.h', 'include/codec/SkCodec.h', 'include/codec/SkEncodedFormat.h', - 'include/codec/SkScaledCodec.h', 'include/config/SkUserConfig.h', 'include/core/SkAnnotation.h', 'include/core/SkBBHFactory.h', @@ -760,6 +789,7 @@ HDRS = ['include/c/sk_canvas.h', 'include/gpu/gl/GrGLFunctions.h', 'include/gpu/gl/GrGLInterface.h', 'include/gpu/gl/GrGLSLPrettyPrint.h', + 'include/gpu/gl/GrGLTypes.h', 'include/gpu/gl/SkGLContext.h', 'include/gpu/gl/SkNullGLContext.h', 'include/gpu/gl/angle/SkANGLEGLContext.h', @@ -848,8 +878,18 @@ INCLUDES = ['include/c', 'src/utils', 'third_party/etc1', 'third_party/ktx'] -LINKOPTS = ['-ldl'] -PLATFORM_SRCS = ['src/opts/Sk4px_SSE2.h', +LINKOPTS = ['*** BEGIN //conditions:default ***', + '-ldl', + '*** END //conditions:default ***', + '*** BEGIN CONDITION_ANDROID ***', + '-ldl', + '-lEGL', + '*** END CONDITION_ANDROID ***'] +PLATFORM_SRCS = ['*** BEGIN //conditions:default ***', + 'src/gpu/gl/GrGLDefaultInterface_native.cpp', + 'src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp', + 'src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp', + 'src/opts/Sk4px_SSE2.h', 'src/opts/Sk4px_none.h', 'src/opts/SkBitmapFilter_opts_SSE2.cpp', 'src/opts/SkBitmapFilter_opts_SSE2.h', @@ -885,7 +925,58 @@ PLATFORM_SRCS = ['src/opts/Sk4px_SSE2.h', 'src/ports/SkOSLibrary.h', 'src/ports/SkOSLibrary_posix.cpp', 'src/ports/SkTLS_pthread.cpp', - 'src/ports/SkTime_Unix.cpp'] + 'src/ports/SkTime_Unix.cpp', + '*** END //conditions:default ***', + '*** BEGIN CONDITION_ANDROID ***', + 'src/gpu/gl/GrGLDefaultInterface_none.cpp', + 'src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp', + 'src/opts/Sk4px_NEON.h', + 'src/opts/Sk4px_none.h', + 'src/opts/SkBitmapProcState_arm_neon.cpp', + 'src/opts/SkBitmapProcState_filter_neon.h', + 'src/opts/SkBitmapProcState_matrixProcs_neon.cpp', + 'src/opts/SkBitmapProcState_matrix_neon.h', + 'src/opts/SkBitmapProcState_opts_arm.cpp', + 'src/opts/SkBlitMask_opts.h', + 'src/opts/SkBlitMask_opts_arm.cpp', + 'src/opts/SkBlitMask_opts_arm_neon.cpp', + 'src/opts/SkBlitMask_opts_arm_neon.h', + 'src/opts/SkBlitRow_opts.h', + 'src/opts/SkBlitRow_opts_arm.cpp', + 'src/opts/SkBlitRow_opts_arm_neon.cpp', + 'src/opts/SkBlitRow_opts_arm_neon.h', + 'src/opts/SkBlurImageFilter_opts.h', + 'src/opts/SkColorCubeFilter_opts.h', + 'src/opts/SkColor_opts_neon.h', + 'src/opts/SkFloatingPoint_opts.h', + 'src/opts/SkMatrix_opts.h', + 'src/opts/SkMorphologyImageFilter_opts.h', + 'src/opts/SkNx_neon.h', + 'src/opts/SkNx_sse.h', + 'src/opts/SkOpts_neon.cpp', + 'src/opts/SkTextureCompressor_opts.h', + 'src/opts/SkUtils_opts.h', + 'src/opts/SkXfermode_opts.h', + 'src/ports/SkDebug_android.cpp', + 'src/ports/SkDiscardableMemory_none.cpp', + 'src/ports/SkFontHost_FreeType.cpp', + 'src/ports/SkFontHost_FreeType_common.cpp', + 'src/ports/SkFontHost_FreeType_common.h', + 'src/ports/SkFontMgr_android.cpp', + 'src/ports/SkFontMgr_android_factory.cpp', + 'src/ports/SkFontMgr_android_parser.cpp', + 'src/ports/SkFontMgr_android_parser.h', + 'src/ports/SkFontMgr_custom.cpp', + 'src/ports/SkGlobalInitialization_default.cpp', + 'src/ports/SkImageGenerator_skia.cpp', + 'src/ports/SkMemory_malloc.cpp', + 'src/ports/SkOSFile_posix.cpp', + 'src/ports/SkOSFile_stdio.cpp', + 'src/ports/SkOSLibrary.h', + 'src/ports/SkOSLibrary_posix.cpp', + 'src/ports/SkTLS_pthread.cpp', + 'src/ports/SkTime_Unix.cpp', + '*** END CONDITION_ANDROID ***'] SRCS = ['include/private/SkAtomics.h', 'include/private/SkChecksum.h', 'include/private/SkFloatBits.h', @@ -910,6 +1001,7 @@ SRCS = ['include/private/SkAtomics.h', 'src/c/sk_paint.cpp', 'src/c/sk_surface.cpp', 'src/c/sk_types_priv.h', + 'src/codec/SkAndroidCodec.cpp', 'src/codec/SkBmpCodec.cpp', 'src/codec/SkBmpCodec.h', 'src/codec/SkBmpMaskCodec.cpp', @@ -938,11 +1030,14 @@ SRCS = ['include/private/SkAtomics.h', 'src/codec/SkMaskSwizzler.h', 'src/codec/SkMasks.cpp', 'src/codec/SkMasks.h', + 'src/codec/SkSampledCodec.h', 'src/codec/SkSampler.cpp', 'src/codec/SkSampler.h', 'src/codec/SkScaledCodec.cpp', 'src/codec/SkSwizzler.cpp', 'src/codec/SkSwizzler.h', + 'src/codec/SkWebpAdapterCodec.cpp', + 'src/codec/SkWebpAdapterCodec.h', 'src/codec/SkWebpCodec.cpp', 'src/codec/SkWebpCodec.h', 'src/core/Sk4px.h', @@ -1001,6 +1096,7 @@ SRCS = ['include/private/SkAtomics.h', 'src/core/SkCachedData.h', 'src/core/SkCanvas.cpp', 'src/core/SkCanvasPriv.h', + 'src/core/SkChecksum.cpp', 'src/core/SkChunkAlloc.cpp', 'src/core/SkClipStack.cpp', 'src/core/SkColor.cpp', @@ -1173,6 +1269,9 @@ SRCS = ['include/private/SkAtomics.h', 'src/core/SkRegion.cpp', 'src/core/SkRegionPriv.h', 'src/core/SkRegion_path.cpp', + 'src/core/SkRemote.cpp', + 'src/core/SkRemote.h', + 'src/core/SkRemote_protocol.h', 'src/core/SkResourceCache.cpp', 'src/core/SkResourceCache.h', 'src/core/SkScalar.cpp', @@ -1214,6 +1313,7 @@ SRCS = ['include/private/SkAtomics.h', 'src/core/SkTMultiMap.h', 'src/core/SkTSearch.cpp', 'src/core/SkTSort.h', + 'src/core/SkTTopoSort.h', 'src/core/SkTaskGroup.cpp', 'src/core/SkTaskGroup.h', 'src/core/SkTextBlob.cpp', @@ -1361,6 +1461,8 @@ SRCS = ['include/private/SkAtomics.h', 'src/gpu/GrDrawContext.cpp', 'src/gpu/GrDrawTarget.cpp', 'src/gpu/GrDrawTarget.h', + 'src/gpu/GrDrawingManager.cpp', + 'src/gpu/GrDrawingManager.h', 'src/gpu/GrFontScaler.cpp', 'src/gpu/GrFontScaler.h', 'src/gpu/GrFragmentProcessor.cpp', @@ -1453,7 +1555,8 @@ SRCS = ['include/private/SkAtomics.h', 'src/gpu/GrTextContext.h', 'src/gpu/GrTexture.cpp', 'src/gpu/GrTextureAccess.cpp', - 'src/gpu/GrTextureMaker.h', + 'src/gpu/GrTextureParamsAdjuster.cpp', + 'src/gpu/GrTextureParamsAdjuster.h', 'src/gpu/GrTexturePriv.h', 'src/gpu/GrTextureProvider.cpp', 'src/gpu/GrTraceMarker.cpp', @@ -1568,7 +1671,6 @@ SRCS = ['include/private/SkAtomics.h', 'src/gpu/gl/GrGLContext.cpp', 'src/gpu/gl/GrGLContext.h', 'src/gpu/gl/GrGLCreateNullInterface.cpp', - 'src/gpu/gl/GrGLDefaultInterface_native.cpp', 'src/gpu/gl/GrGLDefines.h', 'src/gpu/gl/GrGLExtensions.cpp', 'src/gpu/gl/GrGLFragmentProcessor.cpp', @@ -1607,7 +1709,6 @@ SRCS = ['include/private/SkAtomics.h', 'src/gpu/gl/GrGLRenderTarget.h', 'src/gpu/gl/GrGLSLBlend.cpp', 'src/gpu/gl/GrGLSLBlend.h', - 'src/gpu/gl/GrGLShaderVar.h', 'src/gpu/gl/GrGLStencilAttachment.cpp', 'src/gpu/gl/GrGLStencilAttachment.h', 'src/gpu/gl/GrGLTexture.cpp', @@ -1658,12 +1759,11 @@ SRCS = ['include/private/SkAtomics.h', 'src/gpu/gl/debug/GrVertexArrayObj.h', 'src/gpu/gl/debug/SkDebugGLContext.cpp', 'src/gpu/gl/debug/SkDebugGLContext.h', - 'src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp', - 'src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp', 'src/gpu/glsl/GrGLSL.cpp', 'src/gpu/glsl/GrGLSL.h', 'src/gpu/glsl/GrGLSLCaps.cpp', 'src/gpu/glsl/GrGLSLCaps.h', + 'src/gpu/glsl/GrGLSLShaderVar.h', 'src/gpu/glsl/GrGLSL_impl.h', 'src/image/SkImage.cpp', 'src/image/SkImagePriv.h', @@ -1900,7 +2000,6 @@ SRCS = ['include/private/SkAtomics.h', 'src/utils/SkThreadUtils.h', 'src/utils/SkThreadUtils_pthread.cpp', 'src/utils/SkThreadUtils_pthread.h', - 'src/utils/SkThreadUtils_pthread_linux.cpp', 'src/utils/SkThreadUtils_win.h', 'src/utils/SkWhitelistChecksums.cpp', 'src/utils/SkWhitelistTypefaces.cpp', @@ -1917,5 +2016,93 @@ SRCS = ['include/private/SkAtomics.h', 'third_party/etc1/etc1.h', 'third_party/ktx/ktx.cpp', 'third_party/ktx/ktx.h'] +SRCS_ANDROID = ['src/gpu/gl/GrGLDefaultInterface_none.cpp', + 'src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp', + 'src/opts/Sk4px_NEON.h', + 'src/opts/Sk4px_none.h', + 'src/opts/SkBitmapProcState_arm_neon.cpp', + 'src/opts/SkBitmapProcState_filter_neon.h', + 'src/opts/SkBitmapProcState_matrixProcs_neon.cpp', + 'src/opts/SkBitmapProcState_matrix_neon.h', + 'src/opts/SkBitmapProcState_opts_arm.cpp', + 'src/opts/SkBlitMask_opts.h', + 'src/opts/SkBlitMask_opts_arm.cpp', + 'src/opts/SkBlitMask_opts_arm_neon.cpp', + 'src/opts/SkBlitMask_opts_arm_neon.h', + 'src/opts/SkBlitRow_opts.h', + 'src/opts/SkBlitRow_opts_arm.cpp', + 'src/opts/SkBlitRow_opts_arm_neon.cpp', + 'src/opts/SkBlitRow_opts_arm_neon.h', + 'src/opts/SkBlurImageFilter_opts.h', + 'src/opts/SkColorCubeFilter_opts.h', + 'src/opts/SkColor_opts_neon.h', + 'src/opts/SkFloatingPoint_opts.h', + 'src/opts/SkMatrix_opts.h', + 'src/opts/SkMorphologyImageFilter_opts.h', + 'src/opts/SkNx_neon.h', + 'src/opts/SkNx_sse.h', + 'src/opts/SkOpts_neon.cpp', + 'src/opts/SkTextureCompressor_opts.h', + 'src/opts/SkUtils_opts.h', + 'src/opts/SkXfermode_opts.h', + 'src/ports/SkDebug_android.cpp', + 'src/ports/SkDiscardableMemory_none.cpp', + 'src/ports/SkFontHost_FreeType.cpp', + 'src/ports/SkFontHost_FreeType_common.cpp', + 'src/ports/SkFontHost_FreeType_common.h', + 'src/ports/SkFontMgr_android.cpp', + 'src/ports/SkFontMgr_android_factory.cpp', + 'src/ports/SkFontMgr_android_parser.cpp', + 'src/ports/SkFontMgr_android_parser.h', + 'src/ports/SkFontMgr_custom.cpp', + 'src/ports/SkGlobalInitialization_default.cpp', + 'src/ports/SkImageGenerator_skia.cpp', + 'src/ports/SkMemory_malloc.cpp', + 'src/ports/SkOSFile_posix.cpp', + 'src/ports/SkOSFile_stdio.cpp', + 'src/ports/SkOSLibrary.h', + 'src/ports/SkOSLibrary_posix.cpp', + 'src/ports/SkTLS_pthread.cpp', + 'src/ports/SkTime_Unix.cpp'] SRCS_SSE4 = ['src/opts/SkBlitRow_opts_SSE4.cpp', 'src/opts/SkOpts_sse41.cpp'] SRCS_SSSE3 = ['src/opts/SkBitmapProcState_opts_SSSE3.cpp', 'src/opts/SkOpts_ssse3.cpp'] +SRCS_UNIX = ['src/gpu/gl/GrGLDefaultInterface_native.cpp', + 'src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp', + 'src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp', + 'src/opts/Sk4px_SSE2.h', + 'src/opts/Sk4px_none.h', + 'src/opts/SkBitmapFilter_opts_SSE2.cpp', + 'src/opts/SkBitmapFilter_opts_SSE2.h', + 'src/opts/SkBitmapProcState_opts_SSE2.cpp', + 'src/opts/SkBitmapProcState_opts_SSE2.h', + 'src/opts/SkBlitMask_opts.h', + 'src/opts/SkBlitRow_opts.h', + 'src/opts/SkBlitRow_opts_SSE2.cpp', + 'src/opts/SkBlitRow_opts_SSE2.h', + 'src/opts/SkBlurImageFilter_opts.h', + 'src/opts/SkColorCubeFilter_opts.h', + 'src/opts/SkColor_opts_SSE2.h', + 'src/opts/SkFloatingPoint_opts.h', + 'src/opts/SkMatrix_opts.h', + 'src/opts/SkMorphologyImageFilter_opts.h', + 'src/opts/SkNx_sse.h', + 'src/opts/SkTextureCompressor_opts.h', + 'src/opts/SkUtils_opts.h', + 'src/opts/SkXfermode_opts.h', + 'src/opts/opts_check_x86.cpp', + 'src/ports/SkDebug_stdio.cpp', + 'src/ports/SkDiscardableMemory_none.cpp', + 'src/ports/SkFontHost_FreeType.cpp', + 'src/ports/SkFontHost_FreeType_common.cpp', + 'src/ports/SkFontHost_FreeType_common.h', + 'src/ports/SkFontMgr_custom.cpp', + 'src/ports/SkFontMgr_custom_directory_factory.cpp', + 'src/ports/SkGlobalInitialization_default.cpp', + 'src/ports/SkImageGenerator_skia.cpp', + 'src/ports/SkMemory_malloc.cpp', + 'src/ports/SkOSFile_posix.cpp', + 'src/ports/SkOSFile_stdio.cpp', + 'src/ports/SkOSLibrary.h', + 'src/ports/SkOSLibrary_posix.cpp', + 'src/ports/SkTLS_pthread.cpp', + 'src/ports/SkTime_Unix.cpp'] diff --git a/tools/BUILD_simulator.py b/tools/BUILD_simulator.py index bd4a832..209259f 100755 --- a/tools/BUILD_simulator.py +++ b/tools/BUILD_simulator.py @@ -18,6 +18,14 @@ import re def noop(*args, **kwargs): pass +def select_simulator(d): + result = [] + for k in d: + result.append("*** BEGIN %s ***" % k) + result.extend(d[k]) + result.append("*** END %s ***" % k) + return result + DOUBLE_STAR_RE = re.compile(r'/\*\*/') STAR_RE = re.compile(r'\*') DOUBLE_STAR_PLACEHOLDER = "xxxdoublestarxxx" @@ -63,13 +71,16 @@ def BUILD_glob(include, exclude=()): # Python code. This pulls its variable definitions (SRCS, HDRS, # DEFINES, etc.) into local_names. global_names = { - 'exports_files': noop, 'cc_library': noop, 'cc_test': noop, + 'exports_files': noop, 'glob': BUILD_glob, - 'EXTERNAL_DEPS': [], + 'select': select_simulator, 'BASE_DIR': "", + 'CONDITION_ANDROID': "CONDITION_ANDROID", 'DM_EXTERNAL_DEPS': [], + 'EXTERNAL_DEPS_ANDROID': [], + 'EXTERNAL_DEPS_UNIX': [], } local_names = {} execfile('BUILD.public', global_names, local_names) diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp index fe3dfd1..2fe7824 100644 --- a/tools/flags/SkCommandLineFlags.cpp +++ b/tools/flags/SkCommandLineFlags.cpp @@ -11,7 +11,12 @@ #include -DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashing."); +#if defined(GOOGLE3) && defined(SK_BUILD_FOR_ANDROID) + // I don't know why, but this is defined by //base only for Android. + DECLARE_bool(undefok) +#else + DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashing."); +#endif template static void ignore_result(const T&) {}