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

Side by Side Diff: skia/BUILD.gn

Issue 704363002: XXX test gn format everything (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years 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 | « sdch/BUILD.gn ('k') | sync/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 if (cpu_arch == "arm") { 7 if (cpu_arch == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 10
11 skia_support_gpu = !is_ios 11 skia_support_gpu = !is_ios
12 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) 12 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview)
13 13
14 # The list of Skia defines that are to be set for blink. 14 # The list of Skia defines that are to be set for blink.
15 gypi_blink_skia_defines = exec_script( 15 gypi_blink_skia_defines =
16 "//build/gypi_to_gn.py", 16 exec_script("//build/gypi_to_gn.py",
17 [ rebase_path("//third_party/WebKit/public/blink_skia_config.gypi"), 17 [
18 "--replace=<(skia_include_path)=//third_party/skia/include", 18 rebase_path(
19 "--replace=<(skia_src_path)=//third_party/skia/src" ], 19 "//third_party/WebKit/public/blink_skia_config.gypi"),
20 "scope", 20 "--replace=<(skia_include_path)=//third_party/skia/include",
21 [ "//third_party/WebKit/public/blink_skia_config.gypi" ]) 21 "--replace=<(skia_src_path)=//third_party/skia/src",
22 ],
23 "scope",
24 [ "//third_party/WebKit/public/blink_skia_config.gypi" ])
22 25
23 # The list of Skia defines that are to be set for chromium. 26 # The list of Skia defines that are to be set for chromium.
24 gypi_skia_defines = exec_script( 27 gypi_skia_defines =
25 "//build/gypi_to_gn.py", 28 exec_script("//build/gypi_to_gn.py",
26 [ rebase_path("//third_party/skia/gyp/skia_for_chromium_defines.gypi"), 29 [
27 "--replace=<(skia_include_path)=//third_party/skia/include", 30 rebase_path(
28 "--replace=<(skia_src_path)=//third_party/skia/src" ], 31 "//third_party/skia/gyp/skia_for_chromium_defines.gypi"),
29 "scope", 32 "--replace=<(skia_include_path)=//third_party/skia/include",
30 [ "//third_party/skia/gyp/skia_for_chromium_defines.gypi" ]) 33 "--replace=<(skia_src_path)=//third_party/skia/src",
34 ],
35 "scope",
36 [ "//third_party/skia/gyp/skia_for_chromium_defines.gypi" ])
31 37
32 # The list of Skia core sources that are to be set for chromium. 38 # The list of Skia core sources that are to be set for chromium.
33 gypi_skia_core = exec_script( 39 gypi_skia_core =
34 "//build/gypi_to_gn.py", 40 exec_script("//build/gypi_to_gn.py",
35 [ rebase_path("//third_party/skia/gyp/core.gypi"), 41 [
36 "--replace=<(skia_include_path)=//third_party/skia/include", 42 rebase_path("//third_party/skia/gyp/core.gypi"),
37 "--replace=<(skia_src_path)=//third_party/skia/src" ], 43 "--replace=<(skia_include_path)=//third_party/skia/include",
38 "scope", 44 "--replace=<(skia_src_path)=//third_party/skia/src",
39 [ "//third_party/skia/gyp/core.gypi" ]) 45 ],
46 "scope",
47 [ "//third_party/skia/gyp/core.gypi" ])
40 48
41 # The list of Skia gpu sources that are to be set for chromium. 49 # The list of Skia gpu sources that are to be set for chromium.
42 gypi_skia_gpu = exec_script( 50 gypi_skia_gpu =
43 "//build/gypi_to_gn.py", 51 exec_script("//build/gypi_to_gn.py",
44 [ rebase_path("//third_party/skia/gyp/gpu.gypi"), 52 [
45 "--replace=<(skia_include_path)=//third_party/skia/include", 53 rebase_path("//third_party/skia/gyp/gpu.gypi"),
46 "--replace=<(skia_src_path)=//third_party/skia/src" ], 54 "--replace=<(skia_include_path)=//third_party/skia/include",
47 "scope", 55 "--replace=<(skia_src_path)=//third_party/skia/src",
48 [ "//third_party/skia/gyp/gpu.gypi" ]) 56 ],
57 "scope",
58 [ "//third_party/skia/gyp/gpu.gypi" ])
49 59
50 # The list of Skia pdf sources that are to be set for chromium. 60 # The list of Skia pdf sources that are to be set for chromium.
51 gypi_skia_pdf = exec_script( 61 gypi_skia_pdf =
52 "//build/gypi_to_gn.py", 62 exec_script("//build/gypi_to_gn.py",
53 [ rebase_path("//third_party/skia/gyp/pdf.gypi"), 63 [
54 "--replace=<(skia_include_path)=//third_party/skia/include", 64 rebase_path("//third_party/skia/gyp/pdf.gypi"),
55 "--replace=<(skia_src_path)=//third_party/skia/src" ], 65 "--replace=<(skia_include_path)=//third_party/skia/include",
56 "scope", 66 "--replace=<(skia_src_path)=//third_party/skia/src",
57 [ "//third_party/skia/gyp/pdf.gypi" ]) 67 ],
68 "scope",
69 [ "//third_party/skia/gyp/pdf.gypi" ])
58 70
59 # The list of Skia effects that are to be set for chromium. 71 # The list of Skia effects that are to be set for chromium.
60 gypi_skia_effects = exec_script( 72 gypi_skia_effects =
61 "//build/gypi_to_gn.py", 73 exec_script("//build/gypi_to_gn.py",
62 [ rebase_path("//third_party/skia/gyp/effects.gypi"), 74 [
63 "--replace=<(skia_include_path)=//third_party/skia/include", 75 rebase_path("//third_party/skia/gyp/effects.gypi"),
64 "--replace=<(skia_src_path)=//third_party/skia/src" ], 76 "--replace=<(skia_include_path)=//third_party/skia/include",
65 "scope", 77 "--replace=<(skia_src_path)=//third_party/skia/src",
66 [ "//third_party/skia/gyp/effects.gypi" ]) 78 ],
79 "scope",
80 [ "//third_party/skia/gyp/effects.gypi" ])
67 81
68 # The list of Skia utilss that are to be set for chromium. 82 # The list of Skia utilss that are to be set for chromium.
69 gypi_skia_utils = exec_script( 83 gypi_skia_utils =
70 "//build/gypi_to_gn.py", 84 exec_script("//build/gypi_to_gn.py",
71 [ rebase_path("//third_party/skia/gyp/utils.gypi"), 85 [
72 "--replace=<(skia_include_path)=//third_party/skia/include", 86 rebase_path("//third_party/skia/gyp/utils.gypi"),
73 "--replace=<(skia_src_path)=//third_party/skia/src" ], 87 "--replace=<(skia_include_path)=//third_party/skia/include",
74 "scope", 88 "--replace=<(skia_src_path)=//third_party/skia/src",
75 [ "//third_party/skia/gyp/utils.gypi" ]) 89 ],
90 "scope",
91 [ "//third_party/skia/gyp/utils.gypi" ])
76 92
77 # The list of Skia files is kept in skia_gn_files.gypi. Read it. 93 # The list of Skia files is kept in skia_gn_files.gypi. Read it.
78 gypi_values = exec_script( 94 gypi_values =
79 "//build/gypi_to_gn.py", 95 exec_script("//build/gypi_to_gn.py",
80 [ rebase_path("skia_gn_files.gypi"), 96 [
81 "--replace=<(skia_include_path)=//third_party/skia/include", 97 rebase_path("skia_gn_files.gypi"),
82 "--replace=<(skia_src_path)=//third_party/skia/src" ], 98 "--replace=<(skia_include_path)=//third_party/skia/include",
83 "scope", 99 "--replace=<(skia_src_path)=//third_party/skia/src",
84 [ "skia_gn_files.gypi" ]) 100 ],
101 "scope",
102 [ "skia_gn_files.gypi" ])
85 103
86 # External-facing config for dependent code. 104 # External-facing config for dependent code.
87 config("skia_config") { 105 config("skia_config") {
88 include_dirs = [ 106 include_dirs = [
89 "config", 107 "config",
90 "ext", 108 "ext",
91 "//third_party/skia/include/c", 109 "//third_party/skia/include/c",
92 "//third_party/skia/include/config", 110 "//third_party/skia/include/config",
93 "//third_party/skia/include/core", 111 "//third_party/skia/include/core",
94 "//third_party/skia/include/effects", 112 "//third_party/skia/include/effects",
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 189
172 # skia uses static initializers to initialize the serialization logic 190 # skia uses static initializers to initialize the serialization logic
173 # of its "pictures" library. This is currently not used in chrome; if 191 # of its "pictures" library. This is currently not used in chrome; if
174 # it ever gets used the processes that use it need to call 192 # it ever gets used the processes that use it need to call
175 # SkGraphics::Init(). 193 # SkGraphics::Init().
176 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0", 194 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0",
177 195
178 # Forcing the unoptimized path for the offset image filter in skia until 196 # Forcing the unoptimized path for the offset image filter in skia until
179 # all filters used in Blink support the optimized path properly 197 # all filters used in Blink support the optimized path properly
180 "SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION", 198 "SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION",
181
182 "IGNORE_ROT_AA_RECT_OPT", 199 "IGNORE_ROT_AA_RECT_OPT",
183
184 "SK_IGNORE_BLURRED_RRECT_OPT", 200 "SK_IGNORE_BLURRED_RRECT_OPT",
185 201
186 # this flag forces Skia not to use typographic metrics with GDI. 202 # this flag forces Skia not to use typographic metrics with GDI.
187 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS", 203 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS",
188
189 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE", 204 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE",
190 ] 205 ]
191 206
192 if (component_mode == "shared_library") { 207 if (component_mode == "shared_library") {
193 defines += [ "SKIA_IMPLEMENTATION=1" ] 208 defines += [ "SKIA_IMPLEMENTATION=1" ]
194 } 209 }
195 210
196 if (cpu_arch == "arm") { 211 if (cpu_arch == "arm") {
197 if (arm_use_neon) { 212 if (arm_use_neon) {
198 defines += [ "SK_ARM_HAS_NEON" ] 213 defines += [ "SK_ARM_HAS_NEON" ]
(...skipping 28 matching lines...) Expand all
227 "SK_GAMMA_CONTRAST=0.0", 242 "SK_GAMMA_CONTRAST=0.0",
228 "SK_HIGH_QUALITY_IS_LANCZOS", 243 "SK_HIGH_QUALITY_IS_LANCZOS",
229 ] 244 ]
230 } 245 }
231 246
232 if (is_android) { 247 if (is_android) {
233 defines += [ 248 defines += [
234 # Android devices are typically more memory constrained, so default to a 249 # Android devices are typically more memory constrained, so default to a
235 # smaller glyph cache (it may be overriden at runtime when the renderer 250 # smaller glyph cache (it may be overriden at runtime when the renderer
236 # starts up, depending on the actual device memory). 251 # starts up, depending on the actual device memory).
237 "SK_DEFAULT_FONT_CACHE_LIMIT=1048576" # 1024 * 1024 252 "SK_DEFAULT_FONT_CACHE_LIMIT=1048576", # 1024 * 1024
238 ] 253 ]
239 } else { 254 } else {
240 defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024 255 defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024
241 } 256 }
242 257
243 if (is_win) { 258 if (is_win) {
244 include_dirs = [ 259 include_dirs = [
245 "//third_party/skia/include/utils/win", 260 "//third_party/skia/include/utils/win",
246 "//third_party/skia/src/utils/win", 261 "//third_party/skia/src/utils/win",
247 ] 262 ]
248 263
249 defines += [ "SK_FONTHOST_USES_FONTMGR" ] 264 defines += [ "SK_FONTHOST_USES_FONTMGR" ]
250 265
251 cflags = [ 266 cflags = [
252 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)' 267 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)'
253 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit). 268 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit).
254 "/wd4341", # signed value is out of range for enum constant. 269 "/wd4341", # signed value is out of range for enum constant.
255 "/wd4345", # Object is default-initialized if initialization is omitted. 270 "/wd4345", # Object is default-initialized if initialization is omitted.
256 "/wd4390", # ';'empty statement found in looping;is it what was intended? 271 "/wd4390", # ';'empty statement found in looping;is it what was intended?
257 "/wd4554", # 'operator' : check operator precedence for possible error 272 "/wd4554", # 'operator' : check operator precedence for possible error
258 "/wd4748", # compiler will disable optimizations if a function has inline 273 "/wd4748", # compiler will disable optimizations if a function has inline
259 # assembly code contains flow control(jmp or jcc) statements. 274 # assembly code contains flow control(jmp or jcc) statements.
260 "/wd4800", # forcing value to bool 'true/false'(assigning int to bool). 275 "/wd4800", # forcing value to bool 'true/false'(assigning int to bool).
261 ] 276 ]
262 } 277 }
263 } 278 }
264 279
265 component("skia") { 280 component("skia") {
266 sources = [ 281 sources = [
267 # Chrome sources. 282 # Chrome sources.
268 "config/SkUserConfig.h", 283 "config/SkUserConfig.h",
269 "ext/analysis_canvas.cc", 284 "ext/analysis_canvas.cc",
270 "ext/analysis_canvas.h", 285 "ext/analysis_canvas.h",
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 343 }
329 344
330 # GPU 345 # GPU
331 if (skia_support_gpu) { 346 if (skia_support_gpu) {
332 sources += gypi_skia_gpu.skgpu_sources 347 sources += gypi_skia_gpu.skgpu_sources
333 sources += gypi_skia_gpu.skgpu_null_gl_sources 348 sources += gypi_skia_gpu.skgpu_null_gl_sources
334 } 349 }
335 350
336 # Remove unused util files include in utils.gypi 351 # Remove unused util files include in utils.gypi
337 sources -= [ 352 sources -= [
338 "//third_party/skia/include/utils/SkBoundaryPatch.h", 353 "//third_party/skia/include/utils/SkBoundaryPatch.h",
339 "//third_party/skia/include/utils/SkFrontBufferedStream.h", 354 "//third_party/skia/include/utils/SkFrontBufferedStream.h",
340 "//third_party/skia/include/utils/SkCamera.h", 355 "//third_party/skia/include/utils/SkCamera.h",
341 "//third_party/skia/include/utils/SkCanvasStateUtils.h", 356 "//third_party/skia/include/utils/SkCanvasStateUtils.h",
342 "//third_party/skia/include/utils/SkCubicInterval.h", 357 "//third_party/skia/include/utils/SkCubicInterval.h",
343 "//third_party/skia/include/utils/SkCullPoints.h", 358 "//third_party/skia/include/utils/SkCullPoints.h",
344 "//third_party/skia/include/utils/SkDebugUtils.h", 359 "//third_party/skia/include/utils/SkDebugUtils.h",
345 "//third_party/skia/include/utils/SkDumpCanvas.h", 360 "//third_party/skia/include/utils/SkDumpCanvas.h",
346 "//third_party/skia/include/utils/SkEventTracer.h", 361 "//third_party/skia/include/utils/SkEventTracer.h",
347 "//third_party/skia/include/utils/SkInterpolator.h", 362 "//third_party/skia/include/utils/SkInterpolator.h",
348 "//third_party/skia/include/utils/SkLayer.h", 363 "//third_party/skia/include/utils/SkLayer.h",
349 "//third_party/skia/include/utils/SkMeshUtils.h", 364 "//third_party/skia/include/utils/SkMeshUtils.h",
350 "//third_party/skia/include/utils/SkNinePatch.h", 365 "//third_party/skia/include/utils/SkNinePatch.h",
351 "//third_party/skia/include/utils/SkParse.h", 366 "//third_party/skia/include/utils/SkParse.h",
352 "//third_party/skia/include/utils/SkParsePaint.h", 367 "//third_party/skia/include/utils/SkParsePaint.h",
353 "//third_party/skia/include/utils/SkParsePath.h", 368 "//third_party/skia/include/utils/SkParsePath.h",
354 "//third_party/skia/include/utils/SkRandom.h", 369 "//third_party/skia/include/utils/SkRandom.h",
370 "//third_party/skia/src/utils/SkBitmapHasher.cpp",
371 "//third_party/skia/src/utils/SkBitmapHasher.h",
372 "//third_party/skia/src/utils/SkBoundaryPatch.cpp",
373 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp",
374 "//third_party/skia/src/utils/SkCamera.cpp",
375 "//third_party/skia/src/utils/SkCanvasStack.h",
376 "//third_party/skia/src/utils/SkCubicInterval.cpp",
377 "//third_party/skia/src/utils/SkCullPoints.cpp",
378 "//third_party/skia/src/utils/SkDumpCanvas.cpp",
379 "//third_party/skia/src/utils/SkFloatUtils.h",
380 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp",
381 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.h",
382 "//third_party/skia/src/utils/SkInterpolator.cpp",
383 "//third_party/skia/src/utils/SkLayer.cpp",
384 "//third_party/skia/src/utils/SkMD5.cpp",
385 "//third_party/skia/src/utils/SkMD5.h",
386 "//third_party/skia/src/utils/SkMeshUtils.cpp",
387 "//third_party/skia/src/utils/SkNinePatch.cpp",
388 "//third_party/skia/src/utils/SkOSFile.cpp",
389 "//third_party/skia/src/utils/SkParse.cpp",
390 "//third_party/skia/src/utils/SkParseColor.cpp",
391 "//third_party/skia/src/utils/SkParsePath.cpp",
392 "//third_party/skia/src/utils/SkPathUtils.cpp",
393 "//third_party/skia/src/utils/SkSHA1.cpp",
394 "//third_party/skia/src/utils/SkSHA1.h",
395 "//third_party/skia/src/utils/SkTFitsIn.h",
396 "//third_party/skia/src/utils/SkTLogic.h",
355 397
356 "//third_party/skia/src/utils/SkBitmapHasher.cpp", 398 # We don't currently need to change thread affinity, so leave out this compl exity for now.
357 "//third_party/skia/src/utils/SkBitmapHasher.h", 399 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp",
358 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", 400 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp",
359 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp",
360 "//third_party/skia/src/utils/SkCamera.cpp",
361 "//third_party/skia/src/utils/SkCanvasStack.h",
362 "//third_party/skia/src/utils/SkCubicInterval.cpp",
363 "//third_party/skia/src/utils/SkCullPoints.cpp",
364 "//third_party/skia/src/utils/SkDumpCanvas.cpp",
365 "//third_party/skia/src/utils/SkFloatUtils.h",
366 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp",
367 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.h",
368 "//third_party/skia/src/utils/SkInterpolator.cpp",
369 "//third_party/skia/src/utils/SkLayer.cpp",
370 "//third_party/skia/src/utils/SkMD5.cpp",
371 "//third_party/skia/src/utils/SkMD5.h",
372 "//third_party/skia/src/utils/SkMeshUtils.cpp",
373 "//third_party/skia/src/utils/SkNinePatch.cpp",
374 "//third_party/skia/src/utils/SkOSFile.cpp",
375 "//third_party/skia/src/utils/SkParse.cpp",
376 "//third_party/skia/src/utils/SkParseColor.cpp",
377 "//third_party/skia/src/utils/SkParsePath.cpp",
378 "//third_party/skia/src/utils/SkPathUtils.cpp",
379 "//third_party/skia/src/utils/SkSHA1.cpp",
380 "//third_party/skia/src/utils/SkSHA1.h",
381 "//third_party/skia/src/utils/SkTFitsIn.h",
382 "//third_party/skia/src/utils/SkTLogic.h",
383 401
384 # We don't currently need to change thread affinity, so leave out this complex ity for now. 402 #testing
385 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp", 403 "//third_party/skia/src/fonts/SkGScalerContext.cpp",
386 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp", 404 "//third_party/skia/src/fonts/SkGScalerContext.h",
387
388 #testing
389 "//third_party/skia/src/fonts/SkGScalerContext.cpp",
390 "//third_party/skia/src/fonts/SkGScalerContext.h",
391 ] 405 ]
392 406
393 if (is_win) { 407 if (is_win) {
394 sources -= [ 408 sources -= [
395 # Keeping _win.cpp 409 # Keeping _win.cpp
396 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", 410 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
397 "//third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp", 411 "//third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp",
398 ] 412 ]
399 } else { 413 } else {
400 sources -= [ 414 sources -= [
(...skipping 18 matching lines...) Expand all
419 } 433 }
420 434
421 # Fixup Chrome sources. 435 # Fixup Chrome sources.
422 if (is_posix) { 436 if (is_posix) {
423 sources -= [ "ext/SkThread_chrome.cc" ] 437 sources -= [ "ext/SkThread_chrome.cc" ]
424 } 438 }
425 if (is_win) { 439 if (is_win) {
426 sources -= [ "ext/SkThread_chrome.cc" ] 440 sources -= [ "ext/SkThread_chrome.cc" ]
427 } 441 }
428 if (is_android && (!enable_basic_printing && !enable_print_preview)) { 442 if (is_android && (!enable_basic_printing && !enable_print_preview)) {
429 sources -= [ 443 sources -= [ "ext/skia_utils_base.cc" ]
430 "ext/skia_utils_base.cc",
431 ]
432 } 444 }
433 445
434 # Fixup skia library sources. 446 # Fixup skia library sources.
435 if (is_win) { 447 if (is_win) {
436 sources -= [ 448 sources -= [
437 "//third_party/skia/src/ports/SkOSFile_posix.cpp", 449 "//third_party/skia/src/ports/SkOSFile_posix.cpp",
438 "//third_party/skia/src/ports/SkTime_Unix.cpp", 450 "//third_party/skia/src/ports/SkTime_Unix.cpp",
439 "//third_party/skia/src/ports/SkTLS_pthread.cpp", 451 "//third_party/skia/src/ports/SkTLS_pthread.cpp",
440 ] 452 ]
441 } else { 453 } else {
442 sources -= [ 454 sources -= [
443 "//third_party/skia/src/ports/SkFontHost_win.cpp", 455 "//third_party/skia/src/ports/SkFontHost_win.cpp",
444 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", 456 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp",
445 "//third_party/skia/src/ports/SkOSFile_win.cpp", 457 "//third_party/skia/src/ports/SkOSFile_win.cpp",
446 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", 458 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp",
447 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", 459 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp",
448 "//third_party/skia/src/ports/SkScalerContext_win_dw.h", 460 "//third_party/skia/src/ports/SkScalerContext_win_dw.h",
449 "//third_party/skia/src/ports/SkTLS_win.cpp", 461 "//third_party/skia/src/ports/SkTLS_win.cpp",
450 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", 462 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp",
451 "//third_party/skia/src/ports/SkTypeface_win_dw.h", 463 "//third_party/skia/src/ports/SkTypeface_win_dw.h",
452 ] 464 ]
453 } 465 }
454 if (!is_android) { 466 if (!is_android) {
455 sources -= [ 467 sources -= [
456 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp", 468 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp",
457 "//third_party/skia/src/ports/SkFontMgr_android.cpp", 469 "//third_party/skia/src/ports/SkFontMgr_android.cpp",
458 ] 470 ]
459 } 471 }
460 if (!is_mac) { 472 if (!is_mac) {
461 sources -= [ 473 sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ]
462 "//third_party/skia/src/ports/SkFontHost_mac.cpp",
463 ]
464 } 474 }
465 475
466 if (!is_linux) { 476 if (!is_linux) {
467 sources -= [ 477 sources -= [
468 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp", 478 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp",
469 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", 479 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp",
470 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", 480 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp",
471 ] 481 ]
472 } 482 }
473 483
(...skipping 30 matching lines...) Expand all
504 if (is_clang) { 514 if (is_clang) {
505 # Skia won't compile with some of the more strict clang warnings. 515 # Skia won't compile with some of the more strict clang warnings.
506 # e.g. it does: 516 # e.g. it does:
507 # SkASSERT(!"sk_out_of_memory"); 517 # SkASSERT(!"sk_out_of_memory");
508 configs -= [ "//build/config/clang:extra_warnings" ] 518 configs -= [ "//build/config/clang:extra_warnings" ]
509 } 519 }
510 520
511 configs -= [ "//build/config/compiler:chromium_code" ] 521 configs -= [ "//build/config/compiler:chromium_code" ]
512 configs += [ 522 configs += [
513 ":skia_library_config", 523 ":skia_library_config",
514 "//build/config/compiler:no_chromium_code" 524 "//build/config/compiler:no_chromium_code",
515 ] 525 ]
516 public_configs = [ ":skia_config" ] 526 public_configs = [ ":skia_config" ]
517 527
518 deps = [ 528 deps = [
519 ":skia_opts", 529 ":skia_opts",
520 "//base", 530 "//base",
521 "//base/third_party/dynamic_annotations", 531 "//base/third_party/dynamic_annotations",
522 "//third_party/zlib", 532 "//third_party/zlib",
523 ] 533 ]
524 534
525 if (is_win) { 535 if (is_win) {
526 configs -= [ 536 configs -= [
527 # Some files define WIN32_LEAN_AND_MEAN and we want to avoid a duplicate 537 # Some files define WIN32_LEAN_AND_MEAN and we want to avoid a duplicate
528 # definition warning. 538 # definition warning.
529 "//build/config/win:lean_and_mean", 539 "//build/config/win:lean_and_mean",
530 ] 540 ]
531 } 541 }
532 542
533 if (is_linux) { 543 if (is_linux) {
534 configs += [ 544 configs += [
535 "//build/config/linux:fontconfig", 545 "//build/config/linux:fontconfig",
536 "//build/config/linux:freetype2", 546 "//build/config/linux:freetype2",
537 "//build/config/linux:pangocairo", 547 "//build/config/linux:pangocairo",
538 ] 548 ]
539 deps += [ 549 deps += [ "//third_party/icu:icuuc" ]
540 "//third_party/icu:icuuc",
541 ]
542 } 550 }
543 551
544 if (is_android) { 552 if (is_android) {
545 set_sources_assignment_filter([]) 553 set_sources_assignment_filter([])
546 sources += [ 554 sources += [ "ext/platform_device_linux.cc" ]
547 "ext/platform_device_linux.cc",
548 ]
549 set_sources_assignment_filter(sources_assignment_filter) 555 set_sources_assignment_filter(sources_assignment_filter)
550 deps += [ 556 deps += [
551 "//third_party/expat", 557 "//third_party/expat",
552 "//third_party/freetype", 558 "//third_party/freetype",
553 "//third_party/android_tools:cpu_features", 559 "//third_party/android_tools:cpu_features",
554 ] 560 ]
555 } 561 }
556 562
557 if (skia_support_pdf) { 563 if (skia_support_pdf) {
558 deps += [ "//third_party/sfntly" ] 564 deps += [ "//third_party/sfntly" ]
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 # These are header files used by this target from the skia one above. 603 # These are header files used by this target from the skia one above.
598 "ext/convolver.h", 604 "ext/convolver.h",
599 "//third_party/skia/include/core/SkTypes.h", 605 "//third_party/skia/include/core/SkTypes.h",
600 ] 606 ]
601 607
602 if (!is_win) { 608 if (!is_win) {
603 # SSE 4 609 # SSE 4
604 if (cpu_arch == "x86") { 610 if (cpu_arch == "x86") {
605 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ] 611 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ]
606 } else { # x64 612 } else { # x64
607 sources += [ 613 sources +=
608 "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" 614 [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" ]
609 ]
610 } 615 }
611 } 616 }
612 617
613 if (is_linux || is_mac) { 618 if (is_linux || is_mac) {
614 cflags += [ "-msse4.1" ] 619 cflags += [ "-msse4.1" ]
615 } 620 }
616 } else if (cpu_arch == "arm") { 621 } else if (cpu_arch == "arm") {
617 sources = [ 622 sources = [
618 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp", 623 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp",
619 ] 624 ]
(...skipping 16 matching lines...) Expand all
636 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp", 641 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp",
637 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp", 642 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp",
638 "//third_party/skia/src/opts/memset16_neon.S", 643 "//third_party/skia/src/opts/memset16_neon.S",
639 "//third_party/skia/src/opts/memset32_neon.S", 644 "//third_party/skia/src/opts/memset32_neon.S",
640 ] 645 ]
641 646
642 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 647 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
643 # when running this. 648 # when running this.
644 if (!arm_use_neon) { 649 if (!arm_use_neon) {
645 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 650 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
646 cflags += [ 651 cflags += [ "-mfpu=neon" ]
647 "-mfpu=neon"
648 ]
649 } 652 }
650 653
651 #ldflags = [ 654 #ldflags = [
652 # "-march=armv7-a", 655 # "-march=armv7-a",
653 # "-Wl,--fix-cortex-a8", 656 # "-Wl,--fix-cortex-a8",
654 #] 657 #]
655 } 658 }
656 } 659 }
657 660
658 # Non-Neon ARM code. 661 # Non-Neon ARM code.
(...skipping 17 matching lines...) Expand all
676 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp", 679 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp",
677 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp", 680 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp",
678 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h", 681 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h",
679 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp", 682 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp",
680 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp", 683 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp",
681 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp", 684 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp",
682 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp", 685 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp",
683 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", 686 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
684 ] 687 ]
685 } 688 }
686
687 } else if (cpu_arch == "mipsel") { 689 } else if (cpu_arch == "mipsel") {
688 cflags += [ "-fomit-frame-pointer" ] 690 cflags += [ "-fomit-frame-pointer" ]
689 sources = [ 691 sources = [
690 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp", 692 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp",
691 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp", 693 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp",
692 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp", 694 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp",
693 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp", 695 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp",
694 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp", 696 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp",
695 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp", 697 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp",
696 "//third_party/skia/src/opts/SkUtils_opts_none.cpp", 698 "//third_party/skia/src/opts/SkUtils_opts_none.cpp",
697 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", 699 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
698 ] 700 ]
699 } else { 701 } else {
700 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 702 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
701 } 703 }
702 704
703 if (is_android && !is_debug) { 705 if (is_android && !is_debug) {
704 configs -= [ "//build/config/compiler:optimize" ] 706 configs -= [ "//build/config/compiler:optimize" ]
705 configs += [ "//build/config/compiler:optimize_max" ] 707 configs += [ "//build/config/compiler:optimize_max" ]
706 } 708 }
707 709
708 configs -= [ "//build/config/compiler:chromium_code" ] 710 configs -= [ "//build/config/compiler:chromium_code" ]
709 configs += [ 711 configs += [
710 ":skia_config", 712 ":skia_config",
711 ":skia_library_config", 713 ":skia_library_config",
712 "//build/config/compiler:no_chromium_code" 714 "//build/config/compiler:no_chromium_code",
713 ] 715 ]
714 716
715 deps = [ 717 deps = [
716 "//base", 718 "//base",
717 ] 719 ]
718 720
719 visibility = [ ":skia" ] 721 visibility = [ ":skia" ]
720 } 722 }
OLDNEW
« no previous file with comments | « sdch/BUILD.gn ('k') | sync/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698