| OLD | NEW |
| 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 chromium. | 14 # The list of Skia defines that are to be set for chromium. |
| 15 gypi_skia_defines = exec_script( | 15 gypi_skia_defines = |
| 16 "//build/gypi_to_gn.py", | 16 exec_script("//build/gypi_to_gn.py", |
| 17 [ rebase_path("//third_party/skia/gyp/skia_for_chromium_defines.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/skia/gyp/skia_for_chromium_defines.gypi"), |
| 20 "scope", | 20 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 21 [ "//third_party/skia/gyp/skia_for_chromium_defines.gypi" ]) | 21 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 22 ], |
| 23 "scope", |
| 24 [ "//third_party/skia/gyp/skia_for_chromium_defines.gypi" ]) |
| 22 | 25 |
| 23 # The list of Skia core sources that are to be set for chromium. | 26 # The list of Skia core sources that are to be set for chromium. |
| 24 gypi_skia_core = exec_script( | 27 gypi_skia_core = |
| 25 "//build/gypi_to_gn.py", | 28 exec_script("//build/gypi_to_gn.py", |
| 26 [ rebase_path("//third_party/skia/gyp/core.gypi"), | 29 [ |
| 27 "--replace=<(skia_include_path)=//third_party/skia/include", | 30 rebase_path("//third_party/skia/gyp/core.gypi"), |
| 28 "--replace=<(skia_src_path)=//third_party/skia/src" ], | 31 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 29 "scope", | 32 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 30 [ "//third_party/skia/gyp/core.gypi" ]) | 33 ], |
| 34 "scope", |
| 35 [ "//third_party/skia/gyp/core.gypi" ]) |
| 31 | 36 |
| 32 # The list of Skia gpu sources that are to be set for chromium. | 37 # The list of Skia gpu sources that are to be set for chromium. |
| 33 gypi_skia_gpu = exec_script( | 38 gypi_skia_gpu = |
| 34 "//build/gypi_to_gn.py", | 39 exec_script("//build/gypi_to_gn.py", |
| 35 [ rebase_path("//third_party/skia/gyp/gpu.gypi"), | 40 [ |
| 36 "--replace=<(skia_include_path)=//third_party/skia/include", | 41 rebase_path("//third_party/skia/gyp/gpu.gypi"), |
| 37 "--replace=<(skia_src_path)=//third_party/skia/src" ], | 42 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 38 "scope", | 43 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 39 [ "//third_party/skia/gyp/gpu.gypi" ]) | 44 ], |
| 45 "scope", |
| 46 [ "//third_party/skia/gyp/gpu.gypi" ]) |
| 40 | 47 |
| 41 # The list of Skia pdf sources that are to be set for chromium. | 48 # The list of Skia pdf sources that are to be set for chromium. |
| 42 gypi_skia_pdf = exec_script( | 49 gypi_skia_pdf = |
| 43 "//build/gypi_to_gn.py", | 50 exec_script("//build/gypi_to_gn.py", |
| 44 [ rebase_path("//third_party/skia/gyp/pdf.gypi"), | 51 [ |
| 45 "--replace=<(skia_include_path)=//third_party/skia/include", | 52 rebase_path("//third_party/skia/gyp/pdf.gypi"), |
| 46 "--replace=<(skia_src_path)=//third_party/skia/src" ], | 53 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 47 "scope", | 54 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 48 [ "//third_party/skia/gyp/pdf.gypi" ]) | 55 ], |
| 56 "scope", |
| 57 [ "//third_party/skia/gyp/pdf.gypi" ]) |
| 49 | 58 |
| 50 # The list of Skia effects that are to be set for chromium. | 59 # The list of Skia effects that are to be set for chromium. |
| 51 gypi_skia_effects = exec_script( | 60 gypi_skia_effects = |
| 52 "//build/gypi_to_gn.py", | 61 exec_script("//build/gypi_to_gn.py", |
| 53 [ rebase_path("//third_party/skia/gyp/effects.gypi"), | 62 [ |
| 54 "--replace=<(skia_include_path)=//third_party/skia/include", | 63 rebase_path("//third_party/skia/gyp/effects.gypi"), |
| 55 "--replace=<(skia_src_path)=//third_party/skia/src" ], | 64 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 56 "scope", | 65 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 57 [ "//third_party/skia/gyp/effects.gypi" ]) | 66 ], |
| 67 "scope", |
| 68 [ "//third_party/skia/gyp/effects.gypi" ]) |
| 58 | 69 |
| 59 # The list of Skia utilss that are to be set for chromium. | 70 # The list of Skia utilss that are to be set for chromium. |
| 60 gypi_skia_utils = exec_script( | 71 gypi_skia_utils = |
| 61 "//build/gypi_to_gn.py", | 72 exec_script("//build/gypi_to_gn.py", |
| 62 [ rebase_path("//third_party/skia/gyp/utils.gypi"), | 73 [ |
| 63 "--replace=<(skia_include_path)=//third_party/skia/include", | 74 rebase_path("//third_party/skia/gyp/utils.gypi"), |
| 64 "--replace=<(skia_src_path)=//third_party/skia/src" ], | 75 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 65 "scope", | 76 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 66 [ "//third_party/skia/gyp/utils.gypi" ]) | 77 ], |
| 78 "scope", |
| 79 [ "//third_party/skia/gyp/utils.gypi" ]) |
| 67 | 80 |
| 68 # The list of Skia files is kept in skia_gn_files.gypi. Read it. | 81 # The list of Skia files is kept in skia_gn_files.gypi. Read it. |
| 69 gypi_values = exec_script( | 82 gypi_values = |
| 70 "//build/gypi_to_gn.py", | 83 exec_script("//build/gypi_to_gn.py", |
| 71 [ rebase_path("skia_gn_files.gypi"), | 84 [ |
| 72 "--replace=<(skia_include_path)=//third_party/skia/include", | 85 rebase_path("skia_gn_files.gypi"), |
| 73 "--replace=<(skia_src_path)=//third_party/skia/src" ], | 86 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 74 "scope", | 87 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 75 [ "skia_gn_files.gypi" ]) | 88 ], |
| 89 "scope", |
| 90 [ "skia_gn_files.gypi" ]) |
| 76 | 91 |
| 77 # External-facing config for dependent code. | 92 # External-facing config for dependent code. |
| 78 config("skia_config") { | 93 config("skia_config") { |
| 79 include_dirs = [ | 94 include_dirs = [ |
| 80 "config", | 95 "config", |
| 81 "ext", | 96 "ext", |
| 82 "//third_party/skia/include/c", | 97 "//third_party/skia/include/c", |
| 83 "//third_party/skia/include/config", | 98 "//third_party/skia/include/config", |
| 84 "//third_party/skia/include/core", | 99 "//third_party/skia/include/core", |
| 85 "//third_party/skia/include/effects", | 100 "//third_party/skia/include/effects", |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 176 |
| 162 # skia uses static initializers to initialize the serialization logic | 177 # skia uses static initializers to initialize the serialization logic |
| 163 # of its "pictures" library. This is currently not used in chrome; if | 178 # of its "pictures" library. This is currently not used in chrome; if |
| 164 # it ever gets used the processes that use it need to call | 179 # it ever gets used the processes that use it need to call |
| 165 # SkGraphics::Init(). | 180 # SkGraphics::Init(). |
| 166 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0", | 181 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0", |
| 167 | 182 |
| 168 # Forcing the unoptimized path for the offset image filter in skia until | 183 # Forcing the unoptimized path for the offset image filter in skia until |
| 169 # all filters used in Blink support the optimized path properly | 184 # all filters used in Blink support the optimized path properly |
| 170 "SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION", | 185 "SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION", |
| 171 | |
| 172 "IGNORE_ROT_AA_RECT_OPT", | 186 "IGNORE_ROT_AA_RECT_OPT", |
| 173 | |
| 174 "SK_IGNORE_BLURRED_RRECT_OPT", | 187 "SK_IGNORE_BLURRED_RRECT_OPT", |
| 175 | 188 |
| 176 # this flag forces Skia not to use typographic metrics with GDI. | 189 # this flag forces Skia not to use typographic metrics with GDI. |
| 177 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS", | 190 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS", |
| 178 | |
| 179 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE", | 191 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE", |
| 180 ] | 192 ] |
| 181 | 193 |
| 182 if (component_mode == "shared_library") { | 194 if (component_mode == "shared_library") { |
| 183 defines += [ "SKIA_IMPLEMENTATION=1" ] | 195 defines += [ "SKIA_IMPLEMENTATION=1" ] |
| 184 } | 196 } |
| 185 | 197 |
| 186 if (cpu_arch == "arm") { | 198 if (cpu_arch == "arm") { |
| 187 if (arm_use_neon) { | 199 if (arm_use_neon) { |
| 188 defines += [ "SK_ARM_HAS_NEON" ] | 200 defines += [ "SK_ARM_HAS_NEON" ] |
| (...skipping 28 matching lines...) Expand all Loading... |
| 217 "SK_GAMMA_CONTRAST=0.0", | 229 "SK_GAMMA_CONTRAST=0.0", |
| 218 "SK_HIGH_QUALITY_IS_LANCZOS", | 230 "SK_HIGH_QUALITY_IS_LANCZOS", |
| 219 ] | 231 ] |
| 220 } | 232 } |
| 221 | 233 |
| 222 if (is_android) { | 234 if (is_android) { |
| 223 defines += [ | 235 defines += [ |
| 224 # Android devices are typically more memory constrained, so default to a | 236 # Android devices are typically more memory constrained, so default to a |
| 225 # smaller glyph cache (it may be overriden at runtime when the renderer | 237 # smaller glyph cache (it may be overriden at runtime when the renderer |
| 226 # starts up, depending on the actual device memory). | 238 # starts up, depending on the actual device memory). |
| 227 "SK_DEFAULT_FONT_CACHE_LIMIT=1048576" # 1024 * 1024 | 239 "SK_DEFAULT_FONT_CACHE_LIMIT=1048576", # 1024 * 1024 |
| 228 ] | 240 ] |
| 229 } else { | 241 } else { |
| 230 defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024 | 242 defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024 |
| 231 } | 243 } |
| 232 | 244 |
| 233 if (is_win) { | 245 if (is_win) { |
| 234 include_dirs = [ | 246 include_dirs = [ |
| 235 "//third_party/skia/include/utils/win", | 247 "//third_party/skia/include/utils/win", |
| 236 "//third_party/skia/src/utils/win", | 248 "//third_party/skia/src/utils/win", |
| 237 ] | 249 ] |
| 238 | 250 |
| 239 defines += [ "SK_FONTHOST_USES_FONTMGR" ] | 251 defines += [ "SK_FONTHOST_USES_FONTMGR" ] |
| 240 | 252 |
| 241 cflags = [ | 253 cflags = [ |
| 242 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)' | 254 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)' |
| 243 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit). | 255 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit). |
| 244 "/wd4341", # signed value is out of range for enum constant. | 256 "/wd4341", # signed value is out of range for enum constant. |
| 245 "/wd4345", # Object is default-initialized if initialization is omitted. | 257 "/wd4345", # Object is default-initialized if initialization is omitted. |
| 246 "/wd4390", # ';'empty statement found in looping;is it what was intended? | 258 "/wd4390", # ';'empty statement found in looping;is it what was intended? |
| 247 "/wd4554", # 'operator' : check operator precedence for possible error | 259 "/wd4554", # 'operator' : check operator precedence for possible error |
| 248 "/wd4748", # compiler will disable optimizations if a function has inline | 260 "/wd4748", # compiler will disable optimizations if a function has inline |
| 249 # assembly code contains flow control(jmp or jcc) statements. | 261 # assembly code contains flow control(jmp or jcc) statements. |
| 250 "/wd4800", # forcing value to bool 'true/false'(assigning int to bool). | 262 "/wd4800", # forcing value to bool 'true/false'(assigning int to bool). |
| 251 ] | 263 ] |
| 252 } | 264 } |
| 253 } | 265 } |
| 254 | 266 |
| 255 component("skia") { | 267 component("skia") { |
| 256 sources = [ | 268 sources = [ |
| 257 # Chrome sources. | 269 # Chrome sources. |
| 258 "config/SkUserConfig.h", | 270 "config/SkUserConfig.h", |
| 259 "ext/analysis_canvas.cc", | 271 "ext/analysis_canvas.cc", |
| 260 "ext/analysis_canvas.h", | 272 "ext/analysis_canvas.h", |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 329 } |
| 318 | 330 |
| 319 # GPU | 331 # GPU |
| 320 if (skia_support_gpu) { | 332 if (skia_support_gpu) { |
| 321 sources += gypi_skia_gpu.skgpu_sources | 333 sources += gypi_skia_gpu.skgpu_sources |
| 322 sources += gypi_skia_gpu.skgpu_null_gl_sources | 334 sources += gypi_skia_gpu.skgpu_null_gl_sources |
| 323 } | 335 } |
| 324 | 336 |
| 325 # Remove unused util files include in utils.gypi | 337 # Remove unused util files include in utils.gypi |
| 326 sources -= [ | 338 sources -= [ |
| 327 "//third_party/skia/include/utils/SkBoundaryPatch.h", | 339 "//third_party/skia/include/utils/SkBoundaryPatch.h", |
| 328 "//third_party/skia/include/utils/SkFrontBufferedStream.h", | 340 "//third_party/skia/include/utils/SkFrontBufferedStream.h", |
| 329 "//third_party/skia/include/utils/SkCamera.h", | 341 "//third_party/skia/include/utils/SkCamera.h", |
| 330 "//third_party/skia/include/utils/SkCanvasStateUtils.h", | 342 "//third_party/skia/include/utils/SkCanvasStateUtils.h", |
| 331 "//third_party/skia/include/utils/SkCubicInterval.h", | 343 "//third_party/skia/include/utils/SkCubicInterval.h", |
| 332 "//third_party/skia/include/utils/SkCullPoints.h", | 344 "//third_party/skia/include/utils/SkCullPoints.h", |
| 333 "//third_party/skia/include/utils/SkDebugUtils.h", | 345 "//third_party/skia/include/utils/SkDebugUtils.h", |
| 334 "//third_party/skia/include/utils/SkDumpCanvas.h", | 346 "//third_party/skia/include/utils/SkDumpCanvas.h", |
| 335 "//third_party/skia/include/utils/SkEventTracer.h", | 347 "//third_party/skia/include/utils/SkEventTracer.h", |
| 336 "//third_party/skia/include/utils/SkInterpolator.h", | 348 "//third_party/skia/include/utils/SkInterpolator.h", |
| 337 "//third_party/skia/include/utils/SkLayer.h", | 349 "//third_party/skia/include/utils/SkLayer.h", |
| 338 "//third_party/skia/include/utils/SkMeshUtils.h", | 350 "//third_party/skia/include/utils/SkMeshUtils.h", |
| 339 "//third_party/skia/include/utils/SkNinePatch.h", | 351 "//third_party/skia/include/utils/SkNinePatch.h", |
| 340 "//third_party/skia/include/utils/SkParse.h", | 352 "//third_party/skia/include/utils/SkParse.h", |
| 341 "//third_party/skia/include/utils/SkParsePaint.h", | 353 "//third_party/skia/include/utils/SkParsePaint.h", |
| 342 "//third_party/skia/include/utils/SkParsePath.h", | 354 "//third_party/skia/include/utils/SkParsePath.h", |
| 343 "//third_party/skia/include/utils/SkRandom.h", | 355 "//third_party/skia/include/utils/SkRandom.h", |
| 356 "//third_party/skia/src/utils/SkBitmapHasher.cpp", |
| 357 "//third_party/skia/src/utils/SkBitmapHasher.h", |
| 358 "//third_party/skia/src/utils/SkBoundaryPatch.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", |
| 344 | 383 |
| 345 "//third_party/skia/src/utils/SkBitmapHasher.cpp", | 384 # We don't currently need to change thread affinity, so leave out this compl
exity for now. |
| 346 "//third_party/skia/src/utils/SkBitmapHasher.h", | 385 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp", |
| 347 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", | 386 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp", |
| 348 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", | |
| 349 "//third_party/skia/src/utils/SkCamera.cpp", | |
| 350 "//third_party/skia/src/utils/SkCanvasStack.h", | |
| 351 "//third_party/skia/src/utils/SkCubicInterval.cpp", | |
| 352 "//third_party/skia/src/utils/SkCullPoints.cpp", | |
| 353 "//third_party/skia/src/utils/SkDumpCanvas.cpp", | |
| 354 "//third_party/skia/src/utils/SkFloatUtils.h", | |
| 355 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp", | |
| 356 "//third_party/skia/src/utils/SkGatherPixelRefsAndRects.h", | |
| 357 "//third_party/skia/src/utils/SkInterpolator.cpp", | |
| 358 "//third_party/skia/src/utils/SkLayer.cpp", | |
| 359 "//third_party/skia/src/utils/SkMD5.cpp", | |
| 360 "//third_party/skia/src/utils/SkMD5.h", | |
| 361 "//third_party/skia/src/utils/SkMeshUtils.cpp", | |
| 362 "//third_party/skia/src/utils/SkNinePatch.cpp", | |
| 363 "//third_party/skia/src/utils/SkOSFile.cpp", | |
| 364 "//third_party/skia/src/utils/SkParse.cpp", | |
| 365 "//third_party/skia/src/utils/SkParseColor.cpp", | |
| 366 "//third_party/skia/src/utils/SkParsePath.cpp", | |
| 367 "//third_party/skia/src/utils/SkPathUtils.cpp", | |
| 368 "//third_party/skia/src/utils/SkSHA1.cpp", | |
| 369 "//third_party/skia/src/utils/SkSHA1.h", | |
| 370 "//third_party/skia/src/utils/SkTFitsIn.h", | |
| 371 "//third_party/skia/src/utils/SkTLogic.h", | |
| 372 | 387 |
| 373 # We don't currently need to change thread affinity, so leave out this complex
ity for now. | 388 #testing |
| 374 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp", | 389 "//third_party/skia/src/fonts/SkGScalerContext.cpp", |
| 375 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp", | 390 "//third_party/skia/src/fonts/SkGScalerContext.h", |
| 376 | |
| 377 #testing | |
| 378 "//third_party/skia/src/fonts/SkGScalerContext.cpp", | |
| 379 "//third_party/skia/src/fonts/SkGScalerContext.h", | |
| 380 ] | 391 ] |
| 381 | 392 |
| 382 if (is_win) { | 393 if (is_win) { |
| 383 sources -= [ | 394 sources -= [ |
| 384 # Keeping _win.cpp | 395 # Keeping _win.cpp |
| 385 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", | 396 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", |
| 386 "//third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp", | 397 "//third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp", |
| 387 ] | 398 ] |
| 388 } else { | 399 } else { |
| 389 sources -= [ | 400 sources -= [ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 408 } | 419 } |
| 409 | 420 |
| 410 # Fixup Chrome sources. | 421 # Fixup Chrome sources. |
| 411 if (is_posix) { | 422 if (is_posix) { |
| 412 sources -= [ "ext/SkThread_chrome.cc" ] | 423 sources -= [ "ext/SkThread_chrome.cc" ] |
| 413 } | 424 } |
| 414 if (is_win) { | 425 if (is_win) { |
| 415 sources -= [ "ext/SkThread_chrome.cc" ] | 426 sources -= [ "ext/SkThread_chrome.cc" ] |
| 416 } | 427 } |
| 417 if (is_android && (!enable_basic_printing && !enable_print_preview)) { | 428 if (is_android && (!enable_basic_printing && !enable_print_preview)) { |
| 418 sources -= [ | 429 sources -= [ "ext/skia_utils_base.cc" ] |
| 419 "ext/skia_utils_base.cc", | |
| 420 ] | |
| 421 } | 430 } |
| 422 | 431 |
| 423 # Fixup skia library sources. | 432 # Fixup skia library sources. |
| 424 if (is_win) { | 433 if (is_win) { |
| 425 sources -= [ | 434 sources -= [ |
| 426 "//third_party/skia/src/ports/SkOSFile_posix.cpp", | 435 "//third_party/skia/src/ports/SkOSFile_posix.cpp", |
| 427 "//third_party/skia/src/ports/SkTime_Unix.cpp", | 436 "//third_party/skia/src/ports/SkTime_Unix.cpp", |
| 428 "//third_party/skia/src/ports/SkTLS_pthread.cpp", | 437 "//third_party/skia/src/ports/SkTLS_pthread.cpp", |
| 429 ] | 438 ] |
| 430 } else { | 439 } else { |
| 431 sources -= [ | 440 sources -= [ |
| 432 "//third_party/skia/src/ports/SkFontHost_win.cpp", | 441 "//third_party/skia/src/ports/SkFontHost_win.cpp", |
| 433 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", | 442 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", |
| 434 "//third_party/skia/src/ports/SkOSFile_win.cpp", | 443 "//third_party/skia/src/ports/SkOSFile_win.cpp", |
| 435 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", | 444 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", |
| 436 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", | 445 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", |
| 437 "//third_party/skia/src/ports/SkScalerContext_win_dw.h", | 446 "//third_party/skia/src/ports/SkScalerContext_win_dw.h", |
| 438 "//third_party/skia/src/ports/SkTLS_win.cpp", | 447 "//third_party/skia/src/ports/SkTLS_win.cpp", |
| 439 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", | 448 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", |
| 440 "//third_party/skia/src/ports/SkTypeface_win_dw.h", | 449 "//third_party/skia/src/ports/SkTypeface_win_dw.h", |
| 441 ] | 450 ] |
| 442 } | 451 } |
| 443 if (!is_android) { | 452 if (!is_android) { |
| 444 sources -= [ | 453 sources -= [ |
| 445 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp", | 454 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp", |
| 446 "//third_party/skia/src/ports/SkFontMgr_android.cpp", | 455 "//third_party/skia/src/ports/SkFontMgr_android.cpp", |
| 447 ] | 456 ] |
| 448 } | 457 } |
| 449 if (!is_mac) { | 458 if (!is_mac) { |
| 450 sources -= [ | 459 sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ] |
| 451 "//third_party/skia/src/ports/SkFontHost_mac.cpp", | |
| 452 ] | |
| 453 } | 460 } |
| 454 | 461 |
| 455 if (!is_linux) { | 462 if (!is_linux) { |
| 456 sources -= [ | 463 sources -= [ |
| 457 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp", | 464 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp", |
| 458 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", | 465 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", |
| 459 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", | 466 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", |
| 460 ] | 467 ] |
| 461 } | 468 } |
| 462 | 469 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 493 if (is_clang) { | 500 if (is_clang) { |
| 494 # Skia won't compile with some of the more strict clang warnings. | 501 # Skia won't compile with some of the more strict clang warnings. |
| 495 # e.g. it does: | 502 # e.g. it does: |
| 496 # SkASSERT(!"sk_out_of_memory"); | 503 # SkASSERT(!"sk_out_of_memory"); |
| 497 configs -= [ "//build/config/clang:extra_warnings" ] | 504 configs -= [ "//build/config/clang:extra_warnings" ] |
| 498 } | 505 } |
| 499 | 506 |
| 500 configs -= [ "//build/config/compiler:chromium_code" ] | 507 configs -= [ "//build/config/compiler:chromium_code" ] |
| 501 configs += [ | 508 configs += [ |
| 502 ":skia_library_config", | 509 ":skia_library_config", |
| 503 "//build/config/compiler:no_chromium_code" | 510 "//build/config/compiler:no_chromium_code", |
| 504 ] | 511 ] |
| 505 public_configs = [ ":skia_config" ] | 512 public_configs = [ ":skia_config" ] |
| 506 | 513 |
| 507 deps = [ | 514 deps = [ |
| 508 ":skia_opts", | 515 ":skia_opts", |
| 509 "//base", | 516 "//base", |
| 510 "//base/third_party/dynamic_annotations", | 517 "//base/third_party/dynamic_annotations", |
| 511 "//third_party/zlib", | 518 "//third_party/zlib", |
| 512 ] | 519 ] |
| 513 | 520 |
| 514 if (is_win) { | 521 if (is_win) { |
| 515 configs -= [ | 522 configs -= [ |
| 516 # Some files define WIN32_LEAN_AND_MEAN and we want to avoid a duplicate | 523 # Some files define WIN32_LEAN_AND_MEAN and we want to avoid a duplicate |
| 517 # definition warning. | 524 # definition warning. |
| 518 "//build/config/win:lean_and_mean", | 525 "//build/config/win:lean_and_mean", |
| 519 ] | 526 ] |
| 520 } | 527 } |
| 521 | 528 |
| 522 if (is_linux) { | 529 if (is_linux) { |
| 523 configs += [ | 530 configs += [ |
| 524 "//build/config/linux:fontconfig", | 531 "//build/config/linux:fontconfig", |
| 525 "//build/config/linux:freetype2", | 532 "//build/config/linux:freetype2", |
| 526 "//build/config/linux:pangocairo", | 533 "//build/config/linux:pangocairo", |
| 527 ] | 534 ] |
| 528 deps += [ | 535 deps += [ "//third_party/icu:icuuc" ] |
| 529 "//third_party/icu:icuuc", | |
| 530 ] | |
| 531 } | 536 } |
| 532 | 537 |
| 533 if (is_android) { | 538 if (is_android) { |
| 534 set_sources_assignment_filter([]) | 539 set_sources_assignment_filter([]) |
| 535 sources += [ | 540 sources += [ "ext/platform_device_linux.cc" ] |
| 536 "ext/platform_device_linux.cc", | |
| 537 ] | |
| 538 set_sources_assignment_filter(sources_assignment_filter) | 541 set_sources_assignment_filter(sources_assignment_filter) |
| 539 deps += [ | 542 deps += [ |
| 540 "//third_party/expat", | 543 "//third_party/expat", |
| 541 "//third_party/freetype", | 544 "//third_party/freetype", |
| 542 "//third_party/android_tools:cpu_features", | 545 "//third_party/android_tools:cpu_features", |
| 543 ] | 546 ] |
| 544 } | 547 } |
| 545 | 548 |
| 546 if (skia_support_pdf) { | 549 if (skia_support_pdf) { |
| 547 deps += [ "//third_party/sfntly" ] | 550 deps += [ "//third_party/sfntly" ] |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 # These are header files used by this target from the skia one above. | 589 # These are header files used by this target from the skia one above. |
| 587 "ext/convolver.h", | 590 "ext/convolver.h", |
| 588 "//third_party/skia/include/core/SkTypes.h", | 591 "//third_party/skia/include/core/SkTypes.h", |
| 589 ] | 592 ] |
| 590 | 593 |
| 591 if (!is_win) { | 594 if (!is_win) { |
| 592 # SSE 4 | 595 # SSE 4 |
| 593 if (cpu_arch == "x86") { | 596 if (cpu_arch == "x86") { |
| 594 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ] | 597 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ] |
| 595 } else { # x64 | 598 } else { # x64 |
| 596 sources += [ | 599 sources += |
| 597 "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" | 600 [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" ] |
| 598 ] | |
| 599 } | 601 } |
| 600 } | 602 } |
| 601 | 603 |
| 602 if (is_linux || is_mac) { | 604 if (is_linux || is_mac) { |
| 603 cflags += [ "-msse4.1" ] | 605 cflags += [ "-msse4.1" ] |
| 604 } | 606 } |
| 605 } else if (cpu_arch == "arm") { | 607 } else if (cpu_arch == "arm") { |
| 606 sources = [ | 608 sources = [ |
| 607 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp", | 609 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp", |
| 608 ] | 610 ] |
| (...skipping 16 matching lines...) Expand all Loading... |
| 625 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp", | 627 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp", |
| 626 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp", | 628 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp", |
| 627 "//third_party/skia/src/opts/memset16_neon.S", | 629 "//third_party/skia/src/opts/memset16_neon.S", |
| 628 "//third_party/skia/src/opts/memset32_neon.S", | 630 "//third_party/skia/src/opts/memset32_neon.S", |
| 629 ] | 631 ] |
| 630 | 632 |
| 631 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon | 633 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon |
| 632 # when running this. | 634 # when running this. |
| 633 if (!arm_use_neon) { | 635 if (!arm_use_neon) { |
| 634 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 636 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
| 635 cflags += [ | 637 cflags += [ "-mfpu=neon" ] |
| 636 "-mfpu=neon" | |
| 637 ] | |
| 638 } | 638 } |
| 639 | 639 |
| 640 #ldflags = [ | 640 #ldflags = [ |
| 641 # "-march=armv7-a", | 641 # "-march=armv7-a", |
| 642 # "-Wl,--fix-cortex-a8", | 642 # "-Wl,--fix-cortex-a8", |
| 643 #] | 643 #] |
| 644 } | 644 } |
| 645 } | 645 } |
| 646 | 646 |
| 647 # Non-Neon ARM code. | 647 # Non-Neon ARM code. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 665 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp", | 665 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp", |
| 666 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp", | 666 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp", |
| 667 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h", | 667 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h", |
| 668 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp", | 668 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp", |
| 669 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp", | 669 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp", |
| 670 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp", | 670 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp", |
| 671 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp", | 671 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp", |
| 672 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", | 672 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", |
| 673 ] | 673 ] |
| 674 } | 674 } |
| 675 | |
| 676 } else if (cpu_arch == "mipsel") { | 675 } else if (cpu_arch == "mipsel") { |
| 677 cflags += [ "-fomit-frame-pointer" ] | 676 cflags += [ "-fomit-frame-pointer" ] |
| 678 sources = [ | 677 sources = [ |
| 679 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp", | 678 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp", |
| 680 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp", | 679 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp", |
| 681 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp", | 680 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp", |
| 682 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp", | 681 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp", |
| 683 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp", | 682 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp", |
| 684 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp", | 683 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp", |
| 685 "//third_party/skia/src/opts/SkUtils_opts_none.cpp", | 684 "//third_party/skia/src/opts/SkUtils_opts_none.cpp", |
| 686 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", | 685 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", |
| 687 ] | 686 ] |
| 688 } else { | 687 } else { |
| 689 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") | 688 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") |
| 690 } | 689 } |
| 691 | 690 |
| 692 if (is_android && !is_debug) { | 691 if (is_android && !is_debug) { |
| 693 configs -= [ "//build/config/compiler:optimize" ] | 692 configs -= [ "//build/config/compiler:optimize" ] |
| 694 configs += [ "//build/config/compiler:optimize_max" ] | 693 configs += [ "//build/config/compiler:optimize_max" ] |
| 695 } | 694 } |
| 696 | 695 |
| 697 configs -= [ "//build/config/compiler:chromium_code" ] | 696 configs -= [ "//build/config/compiler:chromium_code" ] |
| 698 configs += [ | 697 configs += [ |
| 699 ":skia_config", | 698 ":skia_config", |
| 700 ":skia_library_config", | 699 ":skia_library_config", |
| 701 "//build/config/compiler:no_chromium_code" | 700 "//build/config/compiler:no_chromium_code", |
| 702 ] | 701 ] |
| 703 | 702 |
| 704 deps = [ | 703 deps = [ |
| 705 "//base", | 704 "//base", |
| 706 ] | 705 ] |
| 707 | 706 |
| 708 visibility = [ ":skia" ] | 707 visibility = [ ":skia" ] |
| 709 } | 708 } |
| OLD | NEW |