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

Side by Side 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: Rebase and fix new issues in SkJpegCodec.cpp. 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/codec/SkJpegCodec.cpp » ('j') | src/codec/SkJpegCodec.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Description: 1 # Description:
2 # Skia graphics library. 2 # Skia graphics library.
3 # 3 #
4 # Definitions for Google BUILD file. 4 # Definitions for Google BUILD file.
5 5
6 exports_files(["BUILD.public"]) 6 exports_files(["BUILD.public"])
7 7
8 # Platform-independent SRCS 8 # Platform-independent SRCS
9 SRCS = glob( 9 SRCS = glob(
10 [ 10 [
11 "include/private/*.h", 11 "include/private/*.h",
12 "google/*.cpp", 12 "src/**/*.h",
13 "src/c/*.cpp", 13 "src/**/*.cpp",
14 "src/core/*.cpp", 14 "src/**/*.c",
15 "src/device/*.cpp",
16 "src/doc/*.cpp",
17 "src/effects/*.cpp",
18 "src/effects/gradients/*.cpp",
19 "src/image/*.cpp",
20 "src/images/*.cpp",
21 "src/lazy/*.cpp",
22 "src/pathops/*.cpp",
23 "src/pdf/*.cpp",
24 "src/pipe/*.cpp",
25 "src/sfnt/*.cpp",
26 "src/utils/*.cpp",
27 "src/gpu/*.cpp",
28 "src/gpu/effects/*.cpp",
29 "src/gpu/gl/*.cpp",
30 "src/gpu/gl/builders/*.cpp",
31 "src/gpu/gl/debug/*.cpp",
32 "src/gpu/gl/glx/*.cpp",
33 "src/opts/opts_check_x86.cpp",
34 "src/opts/*SSE2*.cpp",
35 "src/opts/*sse2*.cpp",
36 "src/opts/SkTextureCompression_opts_none.cpp",
37
38 # TODO(mtklein): might be more maintainable with a blacklist instead?
39 "src/ports/SkBarriers_x86.cpp",
40 "src/ports/SkDebug_stdio.cpp",
41 "src/ports/SkDiscardableMemory_none.cpp",
42 "src/ports/SkFontHost_linux.cpp",
43 "src/ports/SkFontHost_FreeType.cpp",
44 "src/ports/SkFontHost_FreeType_common.cpp",
45 "src/ports/SkGlobalInitialization_default.cpp",
46 "src/ports/SkImageGenerator_skia.cpp",
47 "src/ports/SkMemory_malloc.cpp",
48 "src/ports/SkMutex_pthread.h",
49 "src/ports/SkOSFile_posix.cpp",
50 "src/ports/SkOSFile_stdio.cpp",
51 "src/ports/SkTLS_pthread.cpp",
52 "src/ports/SkTime_Unix.cpp",
53 15
54 # Third Party 16 # Third Party
55 "third_party/etc1/*.cpp", 17 "third_party/etc1/*.cpp",
18 "third_party/etc1/*.h",
56 "third_party/ktx/*.cpp", 19 "third_party/ktx/*.cpp",
20 "third_party/ktx/*.h",
57 ], 21 ],
58 exclude = [ 22 exclude = [
59 "src/pdf/SkPDFFont.cpp", # Wrapped by google/SkPDFFont_sfntly.cpp 23 # Exclude platform-dependent files.
60 "src/gpu/gl/GrGLDefaultInterface_none.cpp", 24 "src/device/xps/*", # Windows-only. Move to ports?
61 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", 25 "src/doc/*_XPS.cpp", # Windows-only. Move to ports?
62 # TODO(mtklein): files below here probably want upstream fixes 26 "src/gpu/gl/android/*",
63 "src/utils/SkThreadUtils_pthread_mach.cpp", # Mac-only. Move to ports? 27 "src/gpu/gl/iOS/*",
64 # Non-Mac-non-Linux. Move to ports? 28 "src/gpu/gl/mac/*",
65 "src/utils/SkThreadUtils_pthread_other.cpp", 29 "src/gpu/gl/win/*",
66 "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports? 30 "src/opts/**/*",
67 "src/doc/*_XPS.cpp", # Windows-only. 31 "src/ports/**/*",
32 "src/utils/android/**/*",
33 "src/utils/mac/**/*",
34 "src/utils/SkThreadUtils_pthread_mach.cpp", # Mac-only. Move to ports?
35 "src/utils/SkThreadUtils_pthread_other.cpp", # Non-Mac-non-Linux. Move to ports?
36 "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports?
37 "src/utils/win/**/*",
38 "src/views/sdl/*",
39 "src/views/win/*",
40 "src/views/unix/*",
41
42 # Exclude multiple definitions.
43 # TODO(mtklein): Move to opts?
68 "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp. 44 "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp.
45 "src/fonts/*fontconfig*",
46 "src/gpu/gl/egl/*", # Conflicts with gpu/gl/glx.
47 "src/gpu/gl/nacl/*", # Conflicts with gpu/gl/glx.
48 "src/gpu/gl/GrGLDefaultInterface_none.cpp", # Conflicts with src/gpu/gl /GrGLDefaultInterface_native.cpp
49 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", # Conflicts with src/g pu/gl/glx/GrGLCreateNativeInterface_glx.cpp
50
51 # Exclude files that don't compile with the current DEFINES.
52 "src/gpu/gl/angle/*", # Requires SK_ANGLE define.
53 "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE'
54 "src/gpu/gl/mesa/*", # Requires SK_MESA define.
55 "src/svg/parser/*", # Missing SkSVG.h.
56
57 # Dependency on files outside src.
58 "src/svg/skp2svg.cpp", # Depends on tools/LazyDecodeBitmap.h.
59
60 # Not used.
61 "src/animator/**/*",
62 "src/views/**/*",
63 "src/xml/SkBML_Verbs.h",
64 "src/xml/SkBML_XMLParser.cpp",
65 "src/xml/SkXMLPullParser.cpp",
69 ], 66 ],
70 ) 67 )
71 68
69 # Platform-dependent SRCS for google3-default platform.
70 PLATFORM_SRCS = glob(
71 [
72 "src/opts/**/*.cpp",
73 "src/opts/**/*.h",
74 "src/ports/**/*.cpp",
75 "src/ports/**/*.h",
76 ],
77 exclude = [
78 "src/opts/*arm*",
79 "src/opts/*mips*",
80 "src/opts/*NEON*",
81 "src/opts/*neon*",
82 "src/opts/*SSSE3*",
83 "src/opts/*ssse3*",
84 "src/opts/*SSE4*",
85 "src/opts/*sse4*",
86 "src/opts/SkBlitMask_opts_none.cpp",
87 "src/opts/SkBitmapProcState_opts_none.cpp",
88 "src/opts/SkBlitRow_opts_none.cpp",
89 "src/ports/*android*",
90 "src/ports/*chromium*",
91 "src/ports/*CG*",
92 "src/ports/*fontconfig*",
93 "src/ports/*FontConfig*",
94 "src/ports/*mac*",
95 "src/ports/*mozalloc*",
96 "src/ports/*nacl*",
97 "src/ports/*win*",
98 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
99 "src/ports/SkFontMgr_empty_factory.cpp",
100 "src/ports/SkImageDecoder_WIC.cpp",
101 "src/ports/SkImageDecoder_empty.cpp",
102 "src/ports/SkImageGenerator_none.cpp",
103 "src/ports/SkTLS_none.cpp",
104 ],
105 )
106
72 SRCS_SSSE3 = glob( 107 SRCS_SSSE3 = glob(
73 [ 108 [
74 "src/opts/*SSSE3*.cpp", 109 "src/opts/*SSSE3*.cpp",
75 "src/opts/*ssse3*.cpp", 110 "src/opts/*ssse3*.cpp",
76 ], 111 ],
77 ) 112 )
78 113
79 SRCS_SSE4 = glob( 114 SRCS_SSE4 = glob(
80 [ 115 [
81 "src/opts/*SSE4*.cpp", 116 "src/opts/*SSE4*.cpp",
82 "src/opts/*sse4*.cpp", 117 "src/opts/*sse4*.cpp",
83 ], 118 ],
84 ) 119 )
85 120
86 HDRS = glob( 121 HDRS = glob(
87 [ 122 [
88 "include/**/*.h", 123 "include/**/*.h",
89 ], 124 ],
90 exclude = [ 125 exclude = [
91 "include/animator/*.h", 126 "include/private/**/*",
92 "include/private/*.h", 127
128 # Not used.
129 "include/animator/**/*",
130 "include/views/**/*",
131 "include/xml/SkBML_WXMLParser.h",
132 "include/xml/SkBML_XMLParser.h",
93 ], 133 ],
94 ) 134 )
95 135
96 # Includes needed by Skia implementation. Not public includes. 136 # Includes needed by Skia implementation. Not public includes.
97 INCLUDES = [ 137 INCLUDES = [
98 "include/c", 138 "include/c",
99 "include/codec", 139 "include/codec",
100 "include/config", 140 "include/config",
101 "include/core", 141 "include/core",
102 "include/device",
103 "include/effects", 142 "include/effects",
104 "include/gpu", 143 "include/gpu",
105 "include/images", 144 "include/images",
106 "include/pathops", 145 "include/pathops",
107 "include/pdf",
108 "include/pipe", 146 "include/pipe",
109 "include/ports", 147 "include/ports",
110 "include/private", 148 "include/private",
111 "include/utils", 149 "include/utils",
112 "include/views", 150 "include/svg",
113 "include/xml", 151 "include/xml",
114 "src/core", 152 "src/core",
115 "src/doc",
116 "src/gpu", 153 "src/gpu",
117 "src/image", 154 "src/image",
118 "src/lazy", 155 "src/lazy",
119 "src/opts", 156 "src/opts",
120 "src/pdf", 157 "src/pdf",
121 "src/ports",
122 "src/sfnt", 158 "src/sfnt",
123 "src/utils", 159 "src/utils",
124 "third_party/etc1", 160 "third_party/etc1",
125 "third_party/ktx", 161 "third_party/ktx",
126 ] 162 ]
127 163
164 DM_SRCS = glob(
165 [
166 "dm/*.cpp",
167 "dm/*.h",
168 "gm/*.c",
169 "gm/*.cpp",
170 "gm/*.h",
171 "tests/*.cpp",
172 "tests/*.h",
173 "tools/CrashHandler.cpp",
174 "tools/CrashHandler.h",
175 "tools/LazyDecodeBitmap.cpp",
176 "tools/LazyDecodeBitmap.h",
177 "tools/ProcStats.cpp",
178 "tools/ProcStats.h",
179 "tools/Resources.cpp",
180 "tools/Resources.h",
181 "tools/SkBitmapRegionDecoderInterface.cpp",
182 "tools/SkBitmapRegionDecoderInterface.h",
183 "tools/SkBitmapRegionSampler.cpp",
184 "tools/SkBitmapRegionSampler.h",
185 "tools/SkBitmapRegionCanvas.cpp",
186 "tools/SkBitmapRegionCanvas.h",
187 "tools/flags/*.cpp",
188 "tools/flags/*.h",
189 "tools/timer/*.cpp",
190 "tools/timer/*.h",
191 "tools/sk_tool_utils.cpp",
192 "tools/sk_tool_utils_font.cpp",
193 "tools/sk_tool_utils.h",
194 ],
195 exclude = [
196 "tests/skia_test.cpp", # Old main.
197 "tests/SkpSkGrTest.cpp", # Alternate main.
198 "tests/PathOpsSkpClipTest.cpp", # Alternate main.
199 "tests/FontMgrAndroidParserTest.cpp", # Android-only.
200 "dm/DMSrcSinkAndroid.cpp", # Android-only.
201 "tools/timer/SysTimer_windows.cpp",
202 "tools/timer/SysTimer_mach.cpp",
203 ],
204 )
205
206 DM_INCLUDES = [
207 "gm",
208 "src/codec",
209 "src/effects",
210 "src/fonts",
211 "src/pathops",
212 "src/pipe/utils",
213 "src/utils/debugger",
214 "tests",
215 "tools",
216 "tools/flags",
217 "tools/timer",
218 ]
219
128 COPTS = [ 220 COPTS = [
129 "-Wno-deprecated-declarations", # Internal use of deprecated methods. :(
130 "-Wno-implicit-fallthrough", # Some intentional fallthrough. 221 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
131 ] 222 ]
132 223
133 DEFINES = [ 224 DEFINES = [
134 # It'd be nice for fastbuild, dbg -> SK_DEBUG, opt -> SK_RELEASE. 225 # It'd be nice for fastbuild, dbg -> SK_DEBUG, opt -> SK_RELEASE.
135 "SK_RELEASE", 226 "SK_RELEASE",
136 # Chrome DEFINES. 227 # Chrome DEFINES.
137 "SK_USE_FLOATBITS", 228 "SK_USE_FLOATBITS",
138 "SK_USE_FREETYPE_EMBOLDEN", 229 "SK_USE_FREETYPE_EMBOLDEN",
139 # Turn on a few Google3-specific build fixes. 230 # Turn on a few Google3-specific build fixes.
140 "GOOGLE3", 231 "GOOGLE3",
141 "SK_BUILD_FOR_UNIX", 232 "SK_BUILD_FOR_UNIX",
142 "SK_SAMPLES_FOR_X", 233 "SK_SAMPLES_FOR_X",
143 ] 234 ]
144 235
145 LINKOPTS = ["-ldl"] 236 LINKOPTS = ["-ldl"]
237
238 cc_library(
239 name = "opts_ssse3",
240 srcs = SRCS_SSSE3,
241 copts = COPTS + ["-mssse3"],
242 defines = DEFINES,
243 includes = INCLUDES,
244 )
245
246 cc_library(
247 name = "opts_sse4",
248 srcs = SRCS_SSE4,
249 copts = COPTS + ["-msse4"],
250 defines = DEFINES,
251 includes = INCLUDES,
252 )
253
254 cc_library(
255 name = "skia",
256 srcs = SRCS + PLATFORM_SRCS,
257 hdrs = HDRS,
258 copts = COPTS,
259 defines = DEFINES,
260 includes = INCLUDES,
261 linkopts = LINKOPTS,
262 visibility = [":skia_clients"],
263 deps = EXTERNAL_DEPS + [
264 ":opts_sse4",
265 ":opts_ssse3",
266 ],
267 )
268
269 cc_test(
270 name = "dm",
271 size = "large",
272 srcs = DM_SRCS,
273 args = [
274 "--nogpu",
275 "--verbose",
276 # TODO(mtklein): maybe investigate why these fail?
277 "--match ~FontMgr ~Gif ~Scalar ~Canvas ~Codec_stripes ~Stream ~skps",
278 # TODO(benjaminwagner): dm can't find resources when running on TAP.
279 "--resourcePath %s/resources" % BASE_DIR,
280 "--images %s/resources" % BASE_DIR,
281 ],
282 copts = COPTS,
283 data = glob(["resources/*"]),
284 defines = DEFINES,
285 includes = DM_INCLUDES,
286 deps = DM_EXTERNAL_DEPS + [
287 ":skia",
288 ],
289 )
OLDNEW
« no previous file with comments | « no previous file | src/codec/SkJpegCodec.cpp » ('j') | src/codec/SkJpegCodec.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698