| 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 import("//testing/test.gni") | 7 import("//testing/test.gni") |
| 8 if (current_cpu == "arm" || current_cpu == "arm64") { | 8 if (current_cpu == "arm" || current_cpu == "arm64") { |
| 9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
| 10 } | 10 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 gypi_skia_opts = | 71 gypi_skia_opts = |
| 72 exec_script("//build/gypi_to_gn.py", | 72 exec_script("//build/gypi_to_gn.py", |
| 73 [ | 73 [ |
| 74 rebase_path("//third_party/skia/gyp/opts.gypi"), | 74 rebase_path("//third_party/skia/gyp/opts.gypi"), |
| 75 "--replace=<(skia_include_path)=//third_party/skia/include", | 75 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 76 "--replace=<(skia_src_path)=//third_party/skia/src", | 76 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 77 ], | 77 ], |
| 78 "scope", | 78 "scope", |
| 79 [ "//third_party/skia/gyp/opts.gypi" ]) | 79 [ "//third_party/skia/gyp/opts.gypi" ]) |
| 80 | 80 |
| 81 # The list of Skia files is kept in skia_gn_files.gypi. Read it. |
| 82 gypi_values = |
| 83 exec_script("//build/gypi_to_gn.py", |
| 84 [ |
| 85 rebase_path("skia_gn_files.gypi"), |
| 86 "--replace=<(skia_include_path)=//third_party/skia/include", |
| 87 "--replace=<(skia_src_path)=//third_party/skia/src", |
| 88 ], |
| 89 "scope", |
| 90 [ "skia_gn_files.gypi" ]) |
| 91 |
| 81 # External-facing config for dependent code. | 92 # External-facing config for dependent code. |
| 82 config("skia_config") { | 93 config("skia_config") { |
| 83 include_dirs = [ | 94 include_dirs = [ |
| 84 "config", | 95 "config", |
| 85 "ext", | 96 "ext", |
| 86 "//third_party/skia/include/c", | 97 "//third_party/skia/include/c", |
| 87 "//third_party/skia/include/config", | 98 "//third_party/skia/include/config", |
| 88 "//third_party/skia/include/core", | 99 "//third_party/skia/include/core", |
| 89 "//third_party/skia/include/effects", | 100 "//third_party/skia/include/effects", |
| 90 "//third_party/skia/include/images", | 101 "//third_party/skia/include/images", |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 220 } |
| 210 } | 221 } |
| 211 | 222 |
| 212 component("skia") { | 223 component("skia") { |
| 213 sources = [ | 224 sources = [ |
| 214 # Chrome sources. | 225 # Chrome sources. |
| 215 "config/SkUserConfig.h", | 226 "config/SkUserConfig.h", |
| 216 "ext/SkDiscardableMemory_chrome.cc", | 227 "ext/SkDiscardableMemory_chrome.cc", |
| 217 "ext/SkDiscardableMemory_chrome.h", | 228 "ext/SkDiscardableMemory_chrome.h", |
| 218 "ext/SkMemory_new_handler.cpp", | 229 "ext/SkMemory_new_handler.cpp", |
| 219 "ext/bitmap_platform_device.h", | 230 "ext/convolver.cc", |
| 231 "ext/convolver.h", |
| 220 "ext/event_tracer_impl.cc", | 232 "ext/event_tracer_impl.cc", |
| 221 "ext/event_tracer_impl.h", | 233 "ext/event_tracer_impl.h", |
| 222 "ext/google_logging.cc", | 234 "ext/google_logging.cc", |
| 223 "ext/opacity_draw_filter.cc", | |
| 224 "ext/opacity_draw_filter.h", | |
| 225 "ext/platform_canvas.cc", | |
| 226 "ext/platform_canvas.h", | |
| 227 "ext/platform_device.cc", | |
| 228 "ext/platform_device.h", | |
| 229 "ext/platform_device_linux.cc", | |
| 230 "ext/platform_device_mac.cc", | |
| 231 "ext/refptr.h", | |
| 232 "ext/skia_utils_base.cc", | |
| 233 "ext/skia_utils_base.h", | |
| 234 "ext/skia_utils_ios.h", | |
| 235 "ext/skia_utils_ios.mm", | |
| 236 "ext/skia_utils_mac.h", | |
| 237 "ext/skia_utils_mac.mm", | |
| 238 ] | 235 ] |
| 239 | 236 |
| 240 # The skia gypi values are relative to the skia_dir, so we need to rebase. | 237 # The skia gypi values are relative to the skia_dir, so we need to rebase. |
| 241 sources += gypi_skia_core.sources | 238 sources += gypi_skia_core.sources |
| 242 sources += gypi_skia_effects.sources | 239 sources += gypi_skia_effects.sources |
| 243 sources += gypi_skia_utils.sources | 240 sources += gypi_skia_utils.sources |
| 244 | 241 sources += gypi_values.skia_library_sources |
| 245 sources += [ | |
| 246 "//third_party/skia/include/images/SkMovie.h", | |
| 247 "//third_party/skia/include/images/SkPageFlipper.h", | |
| 248 "//third_party/skia/include/ports/SkTypeface_win.h", | |
| 249 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp", | |
| 250 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp", | |
| 251 "//third_party/skia/src/images/SkScaledBitmapSampler.cpp", | |
| 252 "//third_party/skia/src/images/SkScaledBitmapSampler.h", | |
| 253 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", | |
| 254 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", | |
| 255 "//third_party/skia/src/ports/SkFontHost_FreeType_common.h", | |
| 256 "//third_party/skia/src/ports/SkFontHost_mac.cpp", | |
| 257 "//third_party/skia/src/ports/SkFontHost_win.cpp", | |
| 258 "//third_party/skia/src/ports/SkFontMgr_android.cpp", | |
| 259 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", | |
| 260 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", | |
| 261 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", | |
| 262 "//third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp", | |
| 263 "//third_party/skia/src/ports/SkImageDecoder_empty.cpp", | |
| 264 "//third_party/skia/src/ports/SkImageGenerator_none.cpp", | |
| 265 "//third_party/skia/src/ports/SkOSFile_posix.cpp", | |
| 266 "//third_party/skia/src/ports/SkOSFile_stdio.cpp", | |
| 267 "//third_party/skia/src/ports/SkOSFile_win.cpp", | |
| 268 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", | |
| 269 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", | |
| 270 "//third_party/skia/src/ports/SkScalerContext_win_dw.h", | |
| 271 "//third_party/skia/src/ports/SkTLS_pthread.cpp", | |
| 272 "//third_party/skia/src/ports/SkTLS_win.cpp", | |
| 273 "//third_party/skia/src/ports/SkTime_Unix.cpp", | |
| 274 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", | |
| 275 "//third_party/skia/src/ports/SkTypeface_win_dw.h", | |
| 276 "//third_party/skia/src/sfnt/SkOTTable_name.cpp", | |
| 277 "//third_party/skia/src/sfnt/SkOTTable_name.h", | |
| 278 "//third_party/skia/src/sfnt/SkOTUtils.cpp", | |
| 279 "//third_party/skia/src/sfnt/SkOTUtils.h", | |
| 280 "//third_party/skia/src/utils/mac/SkStream_mac.cpp", | |
| 281 ] | |
| 282 | 242 |
| 283 # This and skia_opts are really the same conceptual target so share headers. | 243 # This and skia_opts are really the same conceptual target so share headers. |
| 284 allow_circular_includes_from = [ ":skia_opts" ] | 244 allow_circular_includes_from = [ ":skia_opts" ] |
| 285 | 245 |
| 286 if (current_cpu == "arm") { | 246 if (current_cpu == "arm") { |
| 287 sources += [ | 247 sources += [ |
| 288 "//third_party/skia/src/core/SkUtilsArm.cpp", | 248 "//third_party/skia/src/core/SkUtilsArm.cpp", |
| 289 "//third_party/skia/src/core/SkUtilsArm.h", | 249 "//third_party/skia/src/core/SkUtilsArm.h", |
| 290 ] | 250 ] |
| 291 } | 251 } |
| 292 | 252 |
| 293 # GPU | 253 # GPU |
| 294 | 254 |
| 295 sources += gypi_skia_gpu.skgpu_sources | 255 sources += gypi_skia_gpu.skgpu_sources |
| 296 sources += gypi_skia_gpu.skgpu_null_gl_sources | 256 sources += gypi_skia_gpu.skgpu_null_gl_sources |
| 297 | 257 |
| 298 # Remove unused files from utils. | 258 # Remove unused util files include in utils.gypi |
| 299 sources -= [ | 259 sources -= [ |
| 300 "//third_party/skia/include/utils/SkBoundaryPatch.h", | |
| 301 "//third_party/skia/include/utils/SkCamera.h", | |
| 302 "//third_party/skia/include/utils/SkCanvasStateUtils.h", | |
| 303 "//third_party/skia/include/utils/SkCubicInterval.h", | |
| 304 "//third_party/skia/include/utils/SkCullPoints.h", | |
| 305 "//third_party/skia/include/utils/SkDebugUtils.h", | |
| 306 "//third_party/skia/include/utils/SkDumpCanvas.h", | |
| 307 "//third_party/skia/include/utils/SkEventTracer.h", | |
| 308 "//third_party/skia/include/utils/SkFrontBufferedStream.h", | |
| 309 "//third_party/skia/include/utils/SkInterpolator.h", | |
| 310 "//third_party/skia/include/utils/SkLayer.h", | |
| 311 "//third_party/skia/include/utils/SkMeshUtils.h", | |
| 312 "//third_party/skia/include/utils/SkNinePatch.h", | |
| 313 "//third_party/skia/include/utils/SkParsePaint.h", | |
| 314 "//third_party/skia/include/utils/SkParsePath.h", | |
| 315 "//third_party/skia/include/utils/SkRandom.h", | |
| 316 "//third_party/skia/src/utils/SkBitmapHasher.cpp", | |
| 317 "//third_party/skia/src/utils/SkBitmapHasher.h", | |
| 318 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", | 260 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", |
| 319 "//third_party/skia/src/utils/SkCamera.cpp", | 261 "//third_party/skia/src/utils/SkCamera.cpp", |
| 320 "//third_party/skia/src/utils/SkCanvasStack.h", | 262 "//third_party/skia/src/utils/SkCanvasStack.h", |
| 321 "//third_party/skia/src/utils/SkCubicInterval.cpp", | |
| 322 "//third_party/skia/src/utils/SkCullPoints.cpp", | |
| 323 "//third_party/skia/src/utils/SkDumpCanvas.cpp", | 263 "//third_party/skia/src/utils/SkDumpCanvas.cpp", |
| 324 "//third_party/skia/src/utils/SkFloatUtils.h", | 264 "//third_party/skia/src/utils/SkFloatUtils.h", |
| 325 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", | 265 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", |
| 326 "//third_party/skia/src/utils/SkInterpolator.cpp", | 266 "//third_party/skia/src/utils/SkInterpolator.cpp", |
| 327 "//third_party/skia/src/utils/SkLayer.cpp", | 267 "//third_party/skia/src/utils/SkLayer.cpp", |
| 328 "//third_party/skia/src/utils/SkMD5.cpp", | |
| 329 "//third_party/skia/src/utils/SkMD5.h", | |
| 330 "//third_party/skia/src/utils/SkMeshUtils.cpp", | 268 "//third_party/skia/src/utils/SkMeshUtils.cpp", |
| 331 "//third_party/skia/src/utils/SkNinePatch.cpp", | 269 "//third_party/skia/src/utils/SkNinePatch.cpp", |
| 332 "//third_party/skia/src/utils/SkParsePath.cpp", | 270 "//third_party/skia/src/utils/SkParsePath.cpp", |
| 333 "//third_party/skia/src/utils/SkSHA1.cpp", | 271 |
| 334 "//third_party/skia/src/utils/SkSHA1.h", | 272 #testing |
| 335 "//third_party/skia/src/utils/SkTFitsIn.h", | 273 "//third_party/skia/src/fonts/SkGScalerContext.cpp", |
| 274 "//third_party/skia/src/fonts/SkGScalerContext.h", |
| 336 ] | 275 ] |
| 337 | 276 |
| 338 if (is_ios || is_mac || is_android) { | 277 if (is_ios || is_mac || is_android) { |
| 339 sources -= | 278 sources -= |
| 340 [ "//third_party/skia/src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ] | 279 [ "//third_party/skia/src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ] |
| 341 | 280 |
| 342 set_sources_assignment_filter([]) | 281 set_sources_assignment_filter([]) |
| 343 | 282 |
| 344 if (is_ios) { | 283 if (is_ios) { |
| 345 sources += [ "//third_party/skia/src/gpu/gl/iOS/GrGLCreateNativeInterface_
iOS.cpp" ] | 284 sources += [ "//third_party/skia/src/gpu/gl/iOS/GrGLCreateNativeInterface_
iOS.cpp" ] |
| (...skipping 10 matching lines...) Expand all Loading... |
| 356 set_sources_assignment_filter([]) | 295 set_sources_assignment_filter([]) |
| 357 | 296 |
| 358 sources += [ | 297 sources += [ |
| 359 "//third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp", | 298 "//third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp", |
| 360 "//third_party/skia/src/utils/mac/SkStream_mac.cpp", | 299 "//third_party/skia/src/utils/mac/SkStream_mac.cpp", |
| 361 ] | 300 ] |
| 362 | 301 |
| 363 set_sources_assignment_filter(sources_assignment_filter) | 302 set_sources_assignment_filter(sources_assignment_filter) |
| 364 } | 303 } |
| 365 | 304 |
| 366 if (is_android) { | |
| 367 sources -= [ "ext/skia_utils_base.cc" ] | |
| 368 } | |
| 369 | |
| 370 # Fixup skia library sources. | 305 # Fixup skia library sources. |
| 371 sources -= [ | |
| 372 "//third_party/skia/src/ports/SkFontHost_win.cpp", | |
| 373 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", | |
| 374 "//third_party/skia/src/ports/SkOSFile_win.cpp", | |
| 375 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", | |
| 376 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", | |
| 377 "//third_party/skia/src/ports/SkScalerContext_win_dw.h", | |
| 378 "//third_party/skia/src/ports/SkTLS_win.cpp", | |
| 379 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", | |
| 380 "//third_party/skia/src/ports/SkTypeface_win_dw.h", | |
| 381 "//third_party/skia/src/utils/SkThreadUtils_win.cpp", | |
| 382 ] | |
| 383 if (!is_android) { | 306 if (!is_android) { |
| 384 sources -= [ | 307 sources -= [ |
| 385 "//third_party/skia/src/ports/SkFontMgr_android.cpp", | 308 "//third_party/skia/src/ports/SkFontMgr_android.cpp", |
| 386 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", | 309 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", |
| 387 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", | 310 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", |
| 388 ] | 311 ] |
| 389 } | 312 } |
| 390 if (!is_mac && !is_ios) { | 313 if (!is_mac && !is_ios) { |
| 391 sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ] | 314 sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ] |
| 392 } | 315 } |
| 393 | 316 |
| 394 # On "Linux" (i.e., not Android), we use our a custom SkFontMgr. | 317 # On "Linux" (i.e., not Android), we use our a custom SkFontMgr. |
| 395 # TODO(vtl): We should probably do the same on Android. | 318 # TODO(vtl): We should probably do the same on Android. |
| 396 if (is_linux || is_nacl) { | 319 if (is_linux || is_nacl) { |
| 397 sources += [ | 320 sources += [ |
| 398 "//third_party/skia/src/ports/SkFontMgr_custom.cpp", | 321 "//third_party/skia/src/ports/SkFontMgr_custom.cpp", |
| 399 "ports/font_mgr_factory.cc", | 322 "ports/font_mgr_factory.cc", |
| 400 ] | 323 ] |
| 401 } | 324 } |
| 402 | 325 |
| 403 if (!is_linux && !is_android && !is_nacl) { | 326 if (!is_linux && !is_android && !is_nacl) { |
| 404 sources -= [ | 327 sources -= [ |
| 405 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", | 328 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", |
| 406 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", | 329 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", |
| 407 ] | 330 ] |
| 408 } | 331 } |
| 409 | 332 |
| 410 # Select the right BitmapPlatformDevice. | |
| 411 if (is_mac || is_ios) { | |
| 412 sources += [ | |
| 413 "ext/bitmap_platform_device_mac.cc", | |
| 414 "ext/bitmap_platform_device_mac.h", | |
| 415 ] | |
| 416 } else { | |
| 417 sources += [ | |
| 418 "ext/bitmap_platform_device_skia.cc", | |
| 419 "ext/bitmap_platform_device_skia.h", | |
| 420 ] | |
| 421 } | |
| 422 | |
| 423 if (is_clang) { | 333 if (is_clang) { |
| 424 # Skia won't compile with some of the more strict clang warnings. | 334 # Skia won't compile with some of the more strict clang warnings. |
| 425 # e.g. it does: | 335 # e.g. it does: |
| 426 # SkASSERT(!"sk_out_of_memory"); | 336 # SkASSERT(!"sk_out_of_memory"); |
| 427 configs -= [ "//build/config/clang:extra_warnings" ] | 337 configs -= [ "//build/config/clang:extra_warnings" ] |
| 428 } | 338 } |
| 429 | 339 |
| 430 configs -= [ "//build/config/compiler:chromium_code" ] | 340 configs -= [ "//build/config/compiler:chromium_code" ] |
| 431 configs += [ | 341 configs += [ |
| 432 ":skia_library_config", | 342 ":skia_library_config", |
| (...skipping 10 matching lines...) Expand all Loading... |
| 443 | 353 |
| 444 if (is_linux || is_nacl) { | 354 if (is_linux || is_nacl) { |
| 445 deps += [ | 355 deps += [ |
| 446 "//third_party/freetype2", | 356 "//third_party/freetype2", |
| 447 "//third_party/icu:icuuc", | 357 "//third_party/icu:icuuc", |
| 448 ] | 358 ] |
| 449 } | 359 } |
| 450 | 360 |
| 451 if (is_android) { | 361 if (is_android) { |
| 452 set_sources_assignment_filter([]) | 362 set_sources_assignment_filter([]) |
| 453 sources += [ "ext/platform_device_linux.cc" ] | |
| 454 set_sources_assignment_filter(sources_assignment_filter) | 363 set_sources_assignment_filter(sources_assignment_filter) |
| 455 deps += [ | 364 deps += [ |
| 456 "//third_party/android_tools:cpu_features", | 365 "//third_party/android_tools:cpu_features", |
| 457 "//third_party/expat", | 366 "//third_party/expat", |
| 458 "//third_party/freetype-android:freetype", | 367 "//third_party/freetype-android:freetype", |
| 459 ] | 368 ] |
| 460 } | 369 } |
| 461 | 370 |
| 462 if (is_android && !is_debug) { | 371 if (is_android && !is_debug) { |
| 463 configs -= [ "//build/config/compiler:optimize" ] | 372 configs -= [ "//build/config/compiler:optimize" ] |
| 464 configs += [ "//build/config/compiler:optimize_max" ] | 373 configs += [ "//build/config/compiler:optimize_max" ] |
| 465 } | 374 } |
| 466 } | 375 } |
| 467 | 376 |
| 468 # Separated out so it can be compiled with different flags for SSE. | 377 # Separated out so it can be compiled with different flags for SSE. |
| 469 source_set("skia_opts") { | 378 source_set("skia_opts") { |
| 470 cflags = [] | 379 cflags = [] |
| 471 defines = [] | 380 defines = [] |
| 472 | 381 |
| 473 if (current_cpu == "x86" || current_cpu == "x64") { | 382 if (current_cpu == "x86" || current_cpu == "x64") { |
| 474 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + | 383 if (!is_ios) { |
| 475 gypi_skia_opts.sse41_sources + gypi_skia_opts.avx_sources | 384 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + |
| 476 if (is_linux || is_mac) { | 385 gypi_skia_opts.sse41_sources + gypi_skia_opts.avx_sources + |
| 386 [ |
| 387 # Chrome-specific. |
| 388 "ext/convolver_SSE2.cc", |
| 389 "ext/convolver_SSE2.h", |
| 390 ] |
| 391 |
| 477 cflags += [ "-msse4.1" ] | 392 cflags += [ "-msse4.1" ] |
| 393 } else { |
| 394 sources = gypi_skia_opts.none_sources |
| 478 } | 395 } |
| 479 } else if (current_cpu == "arm" || current_cpu == "arm64") { | 396 } else if (current_cpu == "arm") { |
| 480 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 397 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
| 481 # ARM), the compiler doesn't like that. | 398 # ARM), the compiler doesn't like that. |
| 482 cflags += [ "-fomit-frame-pointer" ] | 399 cflags += [ "-fomit-frame-pointer" ] |
| 483 if (arm_version >= 7 && (arm_use_neon || arm_optionally_use_neon)) { | 400 if (arm_version >= 7 && (arm_use_neon || arm_optionally_use_neon)) { |
| 484 sources = gypi_skia_opts.armv7_sources | 401 sources = gypi_skia_opts.armv7_sources |
| 485 if (arm_use_neon || arm_optionally_use_neon) { | 402 if (arm_use_neon || arm_optionally_use_neon) { |
| 486 sources += gypi_skia_opts.neon_sources | 403 sources += gypi_skia_opts.neon_sources |
| 487 | 404 |
| 488 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon | 405 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon |
| 489 # when running this. | 406 # when running this. |
| 490 if (!arm_use_neon) { | 407 if (!arm_use_neon) { |
| 491 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 408 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
| 492 cflags += [ "-mfpu=neon" ] | 409 cflags += [ "-mfpu=neon" ] |
| 493 } | 410 } |
| 494 } | 411 } |
| 495 } else { | 412 } else { |
| 496 sources = gypi_skia_opts.none_sources | 413 sources = gypi_skia_opts.none_sources |
| 497 } | 414 } |
| 498 } else if (current_cpu == "arm64") { | 415 } else if (current_cpu == "arm64") { |
| 499 # TODO(1841): NEON sources are not currently used on arm64. | 416 # TODO(1841): NEON sources are not currently used on arm64. |
| 500 sources = gypi_skia_opts.none_sources | 417 sources = gypi_skia_opts.none_sources |
| 501 } else if (current_cpu == "mipsel") { | 418 } else if (current_cpu == "mipsel") { |
| 502 cflags += [ "-fomit-frame-pointer" ] | 419 cflags += [ "-fomit-frame-pointer" ] |
| 503 | 420 |
| 504 sources = gypi_skia_opts.none_sources | 421 if (mips_dsp_rev >= 1) { |
| 505 } else if (current_cpu == "pnacl") { | 422 sources = gypi_skia_opts.mips_dsp_sources |
| 506 sources = gypi_skia_opts.none_sources | 423 if (mips_dsp_rev >= 2) { |
| 424 sources += [ |
| 425 # Chrome-specific. |
| 426 "ext/convolver_mips_dspr2.cc", |
| 427 "ext/convolver_mips_dspr2.h", |
| 428 ] |
| 429 } |
| 430 } else { |
| 431 sources = gypi_skia_opts.none_sources |
| 432 } |
| 507 } else { | 433 } else { |
| 508 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") | 434 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") |
| 509 } | 435 } |
| 510 | 436 |
| 511 if (is_android && !is_debug) { | 437 if (is_android && !is_debug) { |
| 512 configs -= [ "//build/config/compiler:optimize" ] | 438 configs -= [ "//build/config/compiler:optimize" ] |
| 513 configs += [ "//build/config/compiler:optimize_max" ] | 439 configs += [ "//build/config/compiler:optimize_max" ] |
| 514 } | 440 } |
| 515 | 441 |
| 516 configs -= [ "//build/config/compiler:chromium_code" ] | 442 configs -= [ "//build/config/compiler:chromium_code" ] |
| 517 configs += [ | 443 configs += [ |
| 518 ":skia_config", | 444 ":skia_config", |
| 519 ":skia_library_config", | 445 ":skia_library_config", |
| 520 "//build/config/compiler:no_chromium_code", | 446 "//build/config/compiler:no_chromium_code", |
| 521 ] | 447 ] |
| 522 | 448 |
| 523 deps = [ | 449 deps = [ |
| 524 "//base", | 450 "//base", |
| 525 ] | 451 ] |
| 526 | 452 |
| 527 visibility = [ ":skia" ] | 453 visibility = [ ":skia" ] |
| 528 } | 454 } |
| 529 | |
| 530 test("skia_unittests") { | |
| 531 sources = [ | |
| 532 "ext/bitmap_platform_device_mac_unittest.cc", | |
| 533 "ext/platform_canvas_unittest.cc", | |
| 534 "ext/refptr_unittest.cc", | |
| 535 "ext/skia_utils_ios_unittest.mm", | |
| 536 "ext/skia_utils_mac_unittest.mm", | |
| 537 ] | |
| 538 | |
| 539 if (!is_mac) { | |
| 540 sources -= [ "ext/platform_canvas_unittest.cc" ] | |
| 541 } | |
| 542 | |
| 543 deps = [ | |
| 544 ":skia", | |
| 545 "//base", | |
| 546 "//base/test:run_all_unittests", | |
| 547 "//testing/gtest", | |
| 548 "//ui/gfx", | |
| 549 "//ui/gfx/geometry", | |
| 550 ] | |
| 551 } | |
| OLD | NEW |