Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: BUILD.public

Issue 1401883005: Add dm target to BUILD and refactor BUILD file. Fix blaze compilation errors. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/codec/SkCodec_libgif.cpp » ('j') | src/codec/SkJpegCodec.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.public
diff --git a/BUILD.public b/BUILD.public
index 8409445d5fab50d239f76b2047ab103d28eb1087..11812950c4003623d3379c6d178e249277a3ea1c 100644
--- a/BUILD.public
+++ b/BUILD.public
@@ -9,56 +9,48 @@ exports_files(["BUILD.public"])
SRCS = glob(
[
"include/private/*.h",
- "google/*.cpp",
- "src/c/*.cpp",
- "src/core/*.cpp",
- "src/device/*.cpp",
- "src/doc/*.cpp",
- "src/effects/*.cpp",
- "src/effects/gradients/*.cpp",
- "src/image/*.cpp",
- "src/images/*.cpp",
- "src/lazy/*.cpp",
- "src/pathops/*.cpp",
- "src/pdf/*.cpp",
- "src/pipe/*.cpp",
- "src/sfnt/*.cpp",
- "src/utils/*.cpp",
- "src/gpu/*.cpp",
- "src/gpu/effects/*.cpp",
- "src/gpu/gl/*.cpp",
- "src/gpu/gl/builders/*.cpp",
- "src/gpu/gl/debug/*.cpp",
- "src/gpu/gl/glx/*.cpp",
- "src/opts/opts_check_x86.cpp",
- "src/opts/*SSE2*.cpp",
- "src/opts/*sse2*.cpp",
- "src/opts/SkTextureCompression_opts_none.cpp",
-
- # TODO(mtklein): might be more maintainable with a blacklist instead?
- "src/ports/SkBarriers_x86.cpp",
- "src/ports/SkDebug_stdio.cpp",
- "src/ports/SkDiscardableMemory_none.cpp",
- "src/ports/SkFontHost_linux.cpp",
- "src/ports/SkFontHost_FreeType.cpp",
- "src/ports/SkFontHost_FreeType_common.cpp",
- "src/ports/SkGlobalInitialization_default.cpp",
- "src/ports/SkImageGenerator_skia.cpp",
- "src/ports/SkMemory_malloc.cpp",
- "src/ports/SkMutex_pthread.h",
- "src/ports/SkOSFile_posix.cpp",
- "src/ports/SkOSFile_stdio.cpp",
- "src/ports/SkTLS_pthread.cpp",
- "src/ports/SkTime_Unix.cpp",
+ "src/**/*.h",
+ "src/**/*.cpp",
+ "src/**/*.c",
# Third Party
"third_party/etc1/*.cpp",
+ "third_party/etc1/*.h",
"third_party/ktx/*.cpp",
+ "third_party/ktx/*.h",
],
exclude = [
mtklein 2015/10/14 18:45:17 This list might be easier to follow with some sort
dogben 2015/10/14 23:11:05 Done.
- "src/pdf/SkPDFFont.cpp", # Wrapped by google/SkPDFFont_sfntly.cpp
- "src/gpu/gl/GrGLDefaultInterface_none.cpp",
- "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
+ # Exclude platform-dependent files.
+ "src/opts/**/*",
+ "src/ports/**/*",
+ "src/gpu/gl/android/*",
+ "src/gpu/gl/iOS/*",
+ "src/gpu/gl/mac/*",
+ "src/gpu/gl/win/*",
+ "src/utils/android/**/*",
+ "src/utils/mac/**/*",
+ "src/utils/win/**/*",
+ "src/views/sdl/*",
+ "src/views/win/*",
+ "src/views/unix/*",
+ # Exclude multiple definitions.
+ # TODO(mtklein): Move to opts?
+ "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
+ # Exclude files that don't compile with the current DEFINES.
+ # TODO(mtklein): Should these be fixed upstream?
mtklein 2015/10/14 18:45:17 These are mostly working as intended I think. A l
dogben 2015/10/14 23:11:05 Done.
+ "src/device/xps/*", # Missing header ObjBase.h.
mtklein 2015/10/14 18:45:16 (Windows-only.)
dogben 2015/10/14 23:11:05 Done.
+ "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.
+ "src/views/animated/*", # Does not compile.
+ "src/xml/SkXMLPullParser.cpp", # Does not compile.
+ # Dependency on files outside src.
+ "src/svg/skp2svg.cpp", # Depends on tools/LazyDecodeBitmap.h.
# TODO(mtklein): files below here probably want upstream fixes
"src/utils/SkThreadUtils_pthread_mach.cpp", # Mac-only. Move to ports?
# Non-Mac-non-Linux. Move to ports?
@@ -69,6 +61,48 @@ SRCS = glob(
],
)
+# Platform-dependent SRCS for google3-default platform.
+PLATFORM_SRCS = glob(
+ [
+ "src/opts/**/*.cpp",
+ "src/opts/**/*.h",
+ "src/ports/**/*.cpp",
+ "src/ports/**/*.h",
+ "src/views/unix/**/*.c",
+ "src/views/unix/**/*.cpp",
+ "src/views/unix/**/*.h",
+ ],
+ exclude = [
+ "src/opts/*arm*",
+ "src/opts/*mips*",
+ "src/opts/*NEON*",
+ "src/opts/*neon*",
+ "src/opts/*SSSE3*",
+ "src/opts/*ssse3*",
+ "src/opts/*SSE4*",
+ "src/opts/*sse4*",
+ "src/opts/SkBlitMask_opts_none.cpp",
+ "src/opts/SkBitmapProcState_opts_none.cpp",
+ "src/opts/SkBlitRow_opts_none.cpp",
+ "src/ports/*android*",
+ "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/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",
+ "src/views/unix/skia_unix.cpp", # Contains main.
+ ],
+)
+
SRCS_SSSE3 = glob(
[
"src/opts/*SSSE3*.cpp",
@@ -88,13 +122,13 @@ HDRS = glob(
"include/**/*.h",
],
exclude = [
- "include/animator/*.h",
"include/private/*.h",
],
)
# Includes needed by Skia implementation. Not public includes.
INCLUDES = [
+ "include/animator",
mtklein 2015/10/14 18:45:17 I'm a little skeptical about some of these additio
dogben 2015/10/14 23:11:05 svg is used in dm/DMSrcSink.cpp, and xml is used b
"include/c",
"include/codec",
"include/config",
@@ -108,23 +142,98 @@ INCLUDES = [
"include/pipe",
"include/ports",
"include/private",
+ "include/svg",
"include/utils",
"include/views",
+ "include/views/animated",
"include/xml",
+ "src/codec",
"src/core",
"src/doc",
+ "src/effects",
+ "src/fonts",
"src/gpu",
"src/image",
"src/lazy",
"src/opts",
+ "src/pathops",
"src/pdf",
+ "src/pipe/utils",
"src/ports",
"src/sfnt",
"src/utils",
+ "src/utils/debugger",
"third_party/etc1",
"third_party/ktx",
]
+DM_SRCS = glob(
+ [
+ "dm/*.cpp",
+ "dm/*.h",
+ "gm/*.c",
+ "gm/*.cpp",
+ "gm/*.h",
+ "tests/*.cpp",
+ "tests/*.h",
+ "tools/CrashHandler.cpp",
+ "tools/CrashHandler.h",
+ "tools/LazyDecodeBitmap.cpp",
+ "tools/LazyDecodeBitmap.h",
+ "tools/ProcStats.cpp",
+ "tools/ProcStats.h",
+ "tools/Resources.cpp",
+ "tools/Resources.h",
+ "tools/SkBitmapRegionDecoderInterface.cpp",
+ "tools/SkBitmapRegionDecoderInterface.h",
+ "tools/SkBitmapRegionSampler.cpp",
+ "tools/SkBitmapRegionSampler.h",
+ "tools/SkBitmapRegionCanvas.cpp",
+ "tools/SkBitmapRegionCanvas.h",
+ "tools/flags/*.cpp",
+ "tools/flags/*.h",
+ "tools/timer/*.cpp",
+ "tools/timer/*.h",
+ "tools/sk_tool_utils.cpp",
+ "tools/sk_tool_utils_font.cpp",
+ "tools/sk_tool_utils.h",
+ ],
+ exclude = [
+ "gm/gmmain.cpp", # Old main
mtklein 2015/10/14 18:45:16 Doesn't exist anymore.
dogben 2015/10/14 23:11:05 Done.
+ "tests/skia_test.cpp", # Old main.
+ "tests/SkpSkGrTest.cpp", # Alternate main.
+ "tests/PathOpsSkpClipTest.cpp", # Alternate main.
+ "tests/FontConfigParser.cpp", # Android-only.
mtklein 2015/10/14 18:45:16 Ditto.
dogben 2015/10/14 23:11:05 Done.
+ "tests/FontMgrAndroidParserTest.cpp", # Android-only.
+ "gm/techtalk1.cpp", # Not in our .gyp.
mtklein 2015/10/14 18:45:17 Ditto.
dogben 2015/10/14 23:11:05 Done.
+ "dm/DMSrcSinkAndroid.cpp", # Does not compile
mtklein 2015/10/14 18:45:16 Might want to say "# Android-only.", but this is f
dogben 2015/10/14 23:11:05 Done.
+ "tools/timer/SysTimer_windows.cpp",
+ "tools/timer/SysTimer_mach.cpp",
+ ],
+)
+
+DM_INCLUDES = [
+ "experimental/PdfViewer",
+ "experimental/PdfViewer/src",
+ "gm",
+ "dm",
+ "include/config",
+ "include/core",
+ "include/effects",
+ "include/ports",
+ "src/core",
+ "src/effects",
+ "src/fonts",
+ "src/pathops",
+ "src/pdf",
+ "src/pipe/utils",
+ "src/utils/debugger",
+ "tests",
+ "tools",
+ "tools/flags",
+ "tools/timer",
+]
+
COPTS = [
"-Wno-deprecated-declarations", # Internal use of deprecated methods. :(
"-Wno-implicit-fallthrough", # Some intentional fallthrough.
@@ -143,3 +252,50 @@ DEFINES = [
]
LINKOPTS = ["-ldl"]
+
+cc_library(
+ name = "opts_ssse3",
+ srcs = SRCS_SSSE3,
+ copts = COPTS + ["-mssse3"],
+ defines = DEFINES,
+ includes = INCLUDES,
+)
+
+cc_library(
+ name = "opts_sse4",
+ srcs = SRCS_SSE4,
+ copts = COPTS + ["-msse4"],
+ defines = DEFINES,
+ includes = INCLUDES,
+)
+
+cc_library(
+ name = "skia",
+ srcs = SRCS + PLATFORM_SRCS,
+ hdrs = HDRS,
+ copts = COPTS,
+ defines = DEFINES,
+ includes = INCLUDES,
+ linkopts = LINKOPTS,
+ visibility = [":skia_clients"],
+ deps = DEPS,
mtklein 2015/10/14 18:45:17 It might be clearer if we move the parts of DEPS t
dogben 2015/10/14 23:11:05 Done.
+)
+
+cc_test(
+ name = "dm",
+ size = "large",
+ srcs = DM_SRCS,
+ args = [
+ "--nogpu",
+ "--verbose",
+ # TODO(mtklein): maybe investigate why these fail?
+ "--match ~FontHostStream ~FontMgr ~Gif ~Picture ~Scalar ~VarAlloc ~Canvas ~Codec_stripes ~Stream ~skps",
+ "--resourcePath %s/resources" % BASE_DIR,
+ "--images %s/resources" % BASE_DIR,
+ ],
+ copts = COPTS,
+ data = glob(["resources/*"]),
+ defines = DEFINES,
+ includes = DM_INCLUDES,
+ deps = DM_DEPS,
+)
« no previous file with comments | « no previous file | src/codec/SkCodec_libgif.cpp » ('j') | src/codec/SkJpegCodec.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698