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

Side by Side Diff: skia/BUILD.gn

Issue 774353003: gn format // (the rest) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase net 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 342 }
328 343
329 # GPU 344 # GPU
330 if (skia_support_gpu) { 345 if (skia_support_gpu) {
331 sources += gypi_skia_gpu.skgpu_sources 346 sources += gypi_skia_gpu.skgpu_sources
332 sources += gypi_skia_gpu.skgpu_null_gl_sources 347 sources += gypi_skia_gpu.skgpu_null_gl_sources
333 } 348 }
334 349
335 # Remove unused util files include in utils.gypi 350 # Remove unused util files include in utils.gypi
336 sources -= [ 351 sources -= [
337 "//third_party/skia/include/utils/SkBoundaryPatch.h", 352 "//third_party/skia/include/utils/SkBoundaryPatch.h",
338 "//third_party/skia/include/utils/SkFrontBufferedStream.h", 353 "//third_party/skia/include/utils/SkFrontBufferedStream.h",
339 "//third_party/skia/include/utils/SkCamera.h", 354 "//third_party/skia/include/utils/SkCamera.h",
340 "//third_party/skia/include/utils/SkCanvasStateUtils.h", 355 "//third_party/skia/include/utils/SkCanvasStateUtils.h",
341 "//third_party/skia/include/utils/SkCubicInterval.h", 356 "//third_party/skia/include/utils/SkCubicInterval.h",
342 "//third_party/skia/include/utils/SkCullPoints.h", 357 "//third_party/skia/include/utils/SkCullPoints.h",
343 "//third_party/skia/include/utils/SkDebugUtils.h", 358 "//third_party/skia/include/utils/SkDebugUtils.h",
344 "//third_party/skia/include/utils/SkDumpCanvas.h", 359 "//third_party/skia/include/utils/SkDumpCanvas.h",
345 "//third_party/skia/include/utils/SkEventTracer.h", 360 "//third_party/skia/include/utils/SkEventTracer.h",
346 "//third_party/skia/include/utils/SkInterpolator.h", 361 "//third_party/skia/include/utils/SkInterpolator.h",
347 "//third_party/skia/include/utils/SkLayer.h", 362 "//third_party/skia/include/utils/SkLayer.h",
348 "//third_party/skia/include/utils/SkMeshUtils.h", 363 "//third_party/skia/include/utils/SkMeshUtils.h",
349 "//third_party/skia/include/utils/SkNinePatch.h", 364 "//third_party/skia/include/utils/SkNinePatch.h",
350 "//third_party/skia/include/utils/SkParse.h", 365 "//third_party/skia/include/utils/SkParse.h",
351 "//third_party/skia/include/utils/SkParsePaint.h", 366 "//third_party/skia/include/utils/SkParsePaint.h",
352 "//third_party/skia/include/utils/SkParsePath.h", 367 "//third_party/skia/include/utils/SkParsePath.h",
353 "//third_party/skia/include/utils/SkRandom.h", 368 "//third_party/skia/include/utils/SkRandom.h",
369 "//third_party/skia/src/utils/SkBitmapHasher.cpp",
370 "//third_party/skia/src/utils/SkBitmapHasher.h",
371 "//third_party/skia/src/utils/SkBoundaryPatch.cpp",
372 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp",
373 "//third_party/skia/src/utils/SkCamera.cpp",
374 "//third_party/skia/src/utils/SkCanvasStack.h",
375 "//third_party/skia/src/utils/SkCubicInterval.cpp",
376 "//third_party/skia/src/utils/SkCullPoints.cpp",
377 "//third_party/skia/src/utils/SkDumpCanvas.cpp",
378 "//third_party/skia/src/utils/SkFloatUtils.h",
379 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp",
380 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.h",
381 "//third_party/skia/src/utils/SkInterpolator.cpp",
382 "//third_party/skia/src/utils/SkLayer.cpp",
383 "//third_party/skia/src/utils/SkMD5.cpp",
384 "//third_party/skia/src/utils/SkMD5.h",
385 "//third_party/skia/src/utils/SkMeshUtils.cpp",
386 "//third_party/skia/src/utils/SkNinePatch.cpp",
387 "//third_party/skia/src/utils/SkOSFile.cpp",
388 "//third_party/skia/src/utils/SkParse.cpp",
389 "//third_party/skia/src/utils/SkParseColor.cpp",
390 "//third_party/skia/src/utils/SkParsePath.cpp",
391 "//third_party/skia/src/utils/SkPathUtils.cpp",
392 "//third_party/skia/src/utils/SkSHA1.cpp",
393 "//third_party/skia/src/utils/SkSHA1.h",
394 "//third_party/skia/src/utils/SkTFitsIn.h",
395 "//third_party/skia/src/utils/SkTLogic.h",
354 396
355 "//third_party/skia/src/utils/SkBitmapHasher.cpp", 397 # We don't currently need to change thread affinity, so leave out this compl exity for now.
356 "//third_party/skia/src/utils/SkBitmapHasher.h", 398 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp",
357 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", 399 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp",
358 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp",
359 "//third_party/skia/src/utils/SkCamera.cpp",
360 "//third_party/skia/src/utils/SkCanvasStack.h",
361 "//third_party/skia/src/utils/SkCubicInterval.cpp",
362 "//third_party/skia/src/utils/SkCullPoints.cpp",
363 "//third_party/skia/src/utils/SkDumpCanvas.cpp",
364 "//third_party/skia/src/utils/SkFloatUtils.h",
365 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp",
366 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.h",
367 "//third_party/skia/src/utils/SkInterpolator.cpp",
368 "//third_party/skia/src/utils/SkLayer.cpp",
369 "//third_party/skia/src/utils/SkMD5.cpp",
370 "//third_party/skia/src/utils/SkMD5.h",
371 "//third_party/skia/src/utils/SkMeshUtils.cpp",
372 "//third_party/skia/src/utils/SkNinePatch.cpp",
373 "//third_party/skia/src/utils/SkOSFile.cpp",
374 "//third_party/skia/src/utils/SkParse.cpp",
375 "//third_party/skia/src/utils/SkParseColor.cpp",
376 "//third_party/skia/src/utils/SkParsePath.cpp",
377 "//third_party/skia/src/utils/SkPathUtils.cpp",
378 "//third_party/skia/src/utils/SkSHA1.cpp",
379 "//third_party/skia/src/utils/SkSHA1.h",
380 "//third_party/skia/src/utils/SkTFitsIn.h",
381 "//third_party/skia/src/utils/SkTLogic.h",
382 400
383 # We don't currently need to change thread affinity, so leave out this complex ity for now. 401 #testing
384 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp", 402 "//third_party/skia/src/fonts/SkGScalerContext.cpp",
385 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp", 403 "//third_party/skia/src/fonts/SkGScalerContext.h",
386
387 #testing
388 "//third_party/skia/src/fonts/SkGScalerContext.cpp",
389 "//third_party/skia/src/fonts/SkGScalerContext.h",
390 ] 404 ]
391 405
392 if (is_win) { 406 if (is_win) {
393 sources -= [ 407 sources -= [
394 # Keeping _win.cpp 408 # Keeping _win.cpp
395 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", 409 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
396 "//third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp", 410 "//third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp",
397 ] 411 ]
398 } else { 412 } else {
399 sources -= [ 413 sources -= [
(...skipping 18 matching lines...) Expand all
418 } 432 }
419 433
420 # Fixup Chrome sources. 434 # Fixup Chrome sources.
421 if (is_posix) { 435 if (is_posix) {
422 sources -= [ "ext/SkThread_chrome.cc" ] 436 sources -= [ "ext/SkThread_chrome.cc" ]
423 } 437 }
424 if (is_win) { 438 if (is_win) {
425 sources -= [ "ext/SkThread_chrome.cc" ] 439 sources -= [ "ext/SkThread_chrome.cc" ]
426 } 440 }
427 if (is_android && (!enable_basic_printing && !enable_print_preview)) { 441 if (is_android && (!enable_basic_printing && !enable_print_preview)) {
428 sources -= [ 442 sources -= [ "ext/skia_utils_base.cc" ]
429 "ext/skia_utils_base.cc",
430 ]
431 } 443 }
432 444
433 # Fixup skia library sources. 445 # Fixup skia library sources.
434 if (is_win) { 446 if (is_win) {
435 sources -= [ 447 sources -= [
436 "//third_party/skia/src/ports/SkOSFile_posix.cpp", 448 "//third_party/skia/src/ports/SkOSFile_posix.cpp",
437 "//third_party/skia/src/ports/SkTime_Unix.cpp", 449 "//third_party/skia/src/ports/SkTime_Unix.cpp",
438 "//third_party/skia/src/ports/SkTLS_pthread.cpp", 450 "//third_party/skia/src/ports/SkTLS_pthread.cpp",
439 ] 451 ]
440 } else { 452 } else {
441 sources -= [ 453 sources -= [
442 "//third_party/skia/src/ports/SkFontHost_win.cpp", 454 "//third_party/skia/src/ports/SkFontHost_win.cpp",
443 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", 455 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp",
444 "//third_party/skia/src/ports/SkOSFile_win.cpp", 456 "//third_party/skia/src/ports/SkOSFile_win.cpp",
445 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", 457 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp",
446 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", 458 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp",
447 "//third_party/skia/src/ports/SkScalerContext_win_dw.h", 459 "//third_party/skia/src/ports/SkScalerContext_win_dw.h",
448 "//third_party/skia/src/ports/SkTLS_win.cpp", 460 "//third_party/skia/src/ports/SkTLS_win.cpp",
449 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", 461 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp",
450 "//third_party/skia/src/ports/SkTypeface_win_dw.h", 462 "//third_party/skia/src/ports/SkTypeface_win_dw.h",
451 ] 463 ]
452 } 464 }
453 if (!is_android) { 465 if (!is_android) {
454 sources -= [ 466 sources -= [
455 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp", 467 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp",
456 "//third_party/skia/src/ports/SkFontMgr_android.cpp", 468 "//third_party/skia/src/ports/SkFontMgr_android.cpp",
457 ] 469 ]
458 } 470 }
459 if (!is_mac) { 471 if (!is_mac) {
460 sources -= [ 472 sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ]
461 "//third_party/skia/src/ports/SkFontHost_mac.cpp",
462 ]
463 } 473 }
464 474
465 if (!is_linux) { 475 if (!is_linux) {
466 sources -= [ 476 sources -= [
467 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp", 477 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp",
468 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", 478 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp",
469 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", 479 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp",
470 ] 480 ]
471 } 481 }
472 482
(...skipping 30 matching lines...) Expand all
503 if (is_clang) { 513 if (is_clang) {
504 # Skia won't compile with some of the more strict clang warnings. 514 # Skia won't compile with some of the more strict clang warnings.
505 # e.g. it does: 515 # e.g. it does:
506 # SkASSERT(!"sk_out_of_memory"); 516 # SkASSERT(!"sk_out_of_memory");
507 configs -= [ "//build/config/clang:extra_warnings" ] 517 configs -= [ "//build/config/clang:extra_warnings" ]
508 } 518 }
509 519
510 configs -= [ "//build/config/compiler:chromium_code" ] 520 configs -= [ "//build/config/compiler:chromium_code" ]
511 configs += [ 521 configs += [
512 ":skia_library_config", 522 ":skia_library_config",
513 "//build/config/compiler:no_chromium_code" 523 "//build/config/compiler:no_chromium_code",
514 ] 524 ]
515 public_configs = [ ":skia_config" ] 525 public_configs = [ ":skia_config" ]
516 526
517 deps = [ 527 deps = [
518 ":skia_opts", 528 ":skia_opts",
519 "//base", 529 "//base",
520 "//base/third_party/dynamic_annotations", 530 "//base/third_party/dynamic_annotations",
521 "//third_party/zlib", 531 "//third_party/zlib",
522 ] 532 ]
523 533
524 if (is_win) { 534 if (is_win) {
525 configs -= [ 535 configs -= [
526 # Some files define WIN32_LEAN_AND_MEAN and we want to avoid a duplicate 536 # Some files define WIN32_LEAN_AND_MEAN and we want to avoid a duplicate
527 # definition warning. 537 # definition warning.
528 "//build/config/win:lean_and_mean", 538 "//build/config/win:lean_and_mean",
529 ] 539 ]
530 } 540 }
531 541
532 if (is_linux) { 542 if (is_linux) {
533 configs += [ 543 configs += [
534 "//build/config/linux:fontconfig", 544 "//build/config/linux:fontconfig",
535 "//build/config/linux:freetype2", 545 "//build/config/linux:freetype2",
536 "//build/config/linux:pangocairo", 546 "//build/config/linux:pangocairo",
537 ] 547 ]
538 deps += [ 548 deps += [ "//third_party/icu:icuuc" ]
539 "//third_party/icu:icuuc",
540 ]
541 } 549 }
542 550
543 if (is_android) { 551 if (is_android) {
544 set_sources_assignment_filter([]) 552 set_sources_assignment_filter([])
545 sources += [ 553 sources += [ "ext/platform_device_linux.cc" ]
546 "ext/platform_device_linux.cc",
547 ]
548 set_sources_assignment_filter(sources_assignment_filter) 554 set_sources_assignment_filter(sources_assignment_filter)
549 deps += [ 555 deps += [
550 "//third_party/expat", 556 "//third_party/expat",
551 "//third_party/freetype", 557 "//third_party/freetype",
552 "//third_party/android_tools:cpu_features", 558 "//third_party/android_tools:cpu_features",
553 ] 559 ]
554 } 560 }
555 561
556 if (skia_support_pdf) { 562 if (skia_support_pdf) {
557 deps += [ "//third_party/sfntly" ] 563 deps += [ "//third_party/sfntly" ]
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 # These are header files used by this target from the skia one above. 602 # These are header files used by this target from the skia one above.
597 "ext/convolver.h", 603 "ext/convolver.h",
598 "//third_party/skia/include/core/SkTypes.h", 604 "//third_party/skia/include/core/SkTypes.h",
599 ] 605 ]
600 606
601 if (!is_win) { 607 if (!is_win) {
602 # SSE 4 608 # SSE 4
603 if (cpu_arch == "x86") { 609 if (cpu_arch == "x86") {
604 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ] 610 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ]
605 } else { # x64 611 } else { # x64
606 sources += [ 612 sources +=
607 "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" 613 [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" ]
608 ]
609 } 614 }
610 } 615 }
611 616
612 if (is_linux || is_mac) { 617 if (is_linux || is_mac) {
613 cflags += [ "-msse4.1" ] 618 cflags += [ "-msse4.1" ]
614 } 619 }
615 } else if (cpu_arch == "arm") { 620 } else if (cpu_arch == "arm") {
616 sources = [ 621 sources = [
617 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp", 622 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp",
618 ] 623 ]
(...skipping 16 matching lines...) Expand all
635 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp", 640 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp",
636 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp", 641 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp",
637 "//third_party/skia/src/opts/memset16_neon.S", 642 "//third_party/skia/src/opts/memset16_neon.S",
638 "//third_party/skia/src/opts/memset32_neon.S", 643 "//third_party/skia/src/opts/memset32_neon.S",
639 ] 644 ]
640 645
641 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 646 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
642 # when running this. 647 # when running this.
643 if (!arm_use_neon) { 648 if (!arm_use_neon) {
644 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 649 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
645 cflags += [ 650 cflags += [ "-mfpu=neon" ]
646 "-mfpu=neon"
647 ]
648 } 651 }
649 652
650 #ldflags = [ 653 #ldflags = [
651 # "-march=armv7-a", 654 # "-march=armv7-a",
652 # "-Wl,--fix-cortex-a8", 655 # "-Wl,--fix-cortex-a8",
653 #] 656 #]
654 } 657 }
655 } 658 }
656 659
657 # Non-Neon ARM code. 660 # Non-Neon ARM code.
(...skipping 17 matching lines...) Expand all
675 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp", 678 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp",
676 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp", 679 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp",
677 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h", 680 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h",
678 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp", 681 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp",
679 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp", 682 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp",
680 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp", 683 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp",
681 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp", 684 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp",
682 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", 685 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
683 ] 686 ]
684 } 687 }
685
686 } else if (cpu_arch == "mipsel") { 688 } else if (cpu_arch == "mipsel") {
687 cflags += [ "-fomit-frame-pointer" ] 689 cflags += [ "-fomit-frame-pointer" ]
688 sources = [ 690 sources = [
689 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp", 691 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp",
690 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp", 692 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp",
691 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp", 693 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp",
692 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp", 694 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp",
693 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp", 695 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp",
694 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp", 696 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp",
695 "//third_party/skia/src/opts/SkUtils_opts_none.cpp", 697 "//third_party/skia/src/opts/SkUtils_opts_none.cpp",
696 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", 698 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
697 ] 699 ]
698 } else { 700 } else {
699 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 701 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
700 } 702 }
701 703
702 if (is_android && !is_debug) { 704 if (is_android && !is_debug) {
703 configs -= [ "//build/config/compiler:optimize" ] 705 configs -= [ "//build/config/compiler:optimize" ]
704 configs += [ "//build/config/compiler:optimize_max" ] 706 configs += [ "//build/config/compiler:optimize_max" ]
705 } 707 }
706 708
707 configs -= [ "//build/config/compiler:chromium_code" ] 709 configs -= [ "//build/config/compiler:chromium_code" ]
708 configs += [ 710 configs += [
709 ":skia_config", 711 ":skia_config",
710 ":skia_library_config", 712 ":skia_library_config",
711 "//build/config/compiler:no_chromium_code" 713 "//build/config/compiler:no_chromium_code",
712 ] 714 ]
713 715
714 deps = [ 716 deps = [
715 "//base", 717 "//base",
716 ] 718 ]
717 719
718 visibility = [ ":skia" ] 720 visibility = [ ":skia" ]
719 } 721 }
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