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

Side by Side Diff: BUILD.gn

Issue 2357703002: GN: add skia_use_mesa for OSMesa in tools. (Closed)
Patch Set: we gn now Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | infra/bots/recipe_modules/flavor/gn_flavor.py » ('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 2016 Google Inc. 1 # Copyright 2016 Google Inc.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import("gn/shared_sources.gni") 6 import("gn/shared_sources.gni")
7 7
8 declare_args() { 8 declare_args() {
9 skia_use_expat = true 9 skia_use_expat = true
10 skia_use_fontconfig = is_linux 10 skia_use_fontconfig = is_linux
11 skia_use_freetype = is_android || is_fuchsia || is_linux 11 skia_use_freetype = is_android || is_fuchsia || is_linux
12 skia_use_giflib = !is_fuchsia 12 skia_use_giflib = !is_fuchsia
13 skia_use_libjpeg_turbo = true 13 skia_use_libjpeg_turbo = true
14 skia_use_libpng = true 14 skia_use_libpng = true
15 skia_use_libwebp = !is_fuchsia 15 skia_use_libwebp = !is_fuchsia
16 skia_use_mesa = false
16 skia_use_sfntly = !is_fuchsia 17 skia_use_sfntly = !is_fuchsia
17 skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24 18 skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
18 skia_use_zlib = true 19 skia_use_zlib = true
19 20
20 skia_enable_android_framework_defines = false 21 skia_enable_android_framework_defines = false
21 skia_enable_gpu = true 22 skia_enable_gpu = true
22 skia_enable_tools = !is_fuchsia 23 skia_enable_tools = !is_fuchsia
23 } 24 }
24 25
25 # Our tools require static linking (they use non-exported symbols) and GPU suppo rt (just lazy). 26 # Our tools require static linking (they use non-exported symbols) and GPU suppo rt (just lazy).
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 ":skia.h", 589 ":skia.h",
589 ] 590 ]
590 } 591 }
591 } 592 }
592 593
593 # Targets guarded by skia_enable_tools may use //third_party freely. 594 # Targets guarded by skia_enable_tools may use //third_party freely.
594 if (skia_enable_tools) { 595 if (skia_enable_tools) {
595 template("test_lib") { 596 template("test_lib") {
596 config(target_name + "_config") { 597 config(target_name + "_config") {
597 include_dirs = invoker.public_include_dirs 598 include_dirs = invoker.public_include_dirs
599 if (defined(invoker.public_defines)) {
600 defines = invoker.public_defines
601 }
598 } 602 }
599 source_set(target_name) { 603 source_set(target_name) {
600 forward_variables_from(invoker, "*", [ "public_include_dirs" ]) 604 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
601 public_configs = [ 605 public_configs = [
602 ":" + target_name + "_config", 606 ":" + target_name + "_config",
603 ":skia_private", 607 ":skia_private",
604 ] 608 ]
605 609
606 if (!defined(deps)) { 610 if (!defined(deps)) {
607 deps = [] 611 deps = []
608 } 612 }
609 deps += [ ":skia" ] 613 deps += [ ":skia" ]
610 testonly = true 614 testonly = true
611 } 615 }
612 } 616 }
613 617
614 test_lib("gpu_tool_utils") { 618 test_lib("gpu_tool_utils") {
619 public_defines = []
615 public_include_dirs = [ "tools/gpu" ] 620 public_include_dirs = [ "tools/gpu" ]
616 sources = [ 621 sources = [
617 "tools/gpu/GrContextFactory.cpp", 622 "tools/gpu/GrContextFactory.cpp",
618 "tools/gpu/GrTest.cpp", 623 "tools/gpu/GrTest.cpp",
619 "tools/gpu/TestContext.cpp", 624 "tools/gpu/TestContext.cpp",
620 "tools/gpu/gl/GLTestContext.cpp", 625 "tools/gpu/gl/GLTestContext.cpp",
621 "tools/gpu/gl/debug/DebugGLTestContext.cpp", 626 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
622 "tools/gpu/gl/debug/GrBufferObj.cpp", 627 "tools/gpu/gl/debug/GrBufferObj.cpp",
623 "tools/gpu/gl/debug/GrFrameBufferObj.cpp", 628 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
624 "tools/gpu/gl/debug/GrProgramObj.cpp", 629 "tools/gpu/gl/debug/GrProgramObj.cpp",
625 "tools/gpu/gl/debug/GrShaderObj.cpp", 630 "tools/gpu/gl/debug/GrShaderObj.cpp",
626 "tools/gpu/gl/debug/GrTextureObj.cpp", 631 "tools/gpu/gl/debug/GrTextureObj.cpp",
627 "tools/gpu/gl/debug/GrTextureUnitObj.cpp", 632 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
628 "tools/gpu/gl/null/NullGLTestContext.cpp", 633 "tools/gpu/gl/null/NullGLTestContext.cpp",
629 ] 634 ]
630 libs = [] 635 libs = []
631 636
632 if (is_android) { 637 if (is_android) {
633 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] 638 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
634 } else if (is_linux) { 639 } else if (is_linux) {
635 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] 640 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
636 } else if (is_mac) { 641 } else if (is_mac) {
637 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] 642 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
638 } 643 }
639 644
640 if (skia_use_vulkan) { 645 if (skia_use_vulkan) {
641 sources += [ "tools/gpu/vk/VkTestContext.cpp" ] 646 sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
642 } 647 }
648 if (skia_use_mesa) {
649 public_defines += [ "SK_MESA" ]
650 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
651 libs += [ "OSMesa" ]
652 }
643 } 653 }
644 654
645 test_lib("flags") { 655 test_lib("flags") {
646 public_include_dirs = [ "tools/flags" ] 656 public_include_dirs = [ "tools/flags" ]
647 sources = [ 657 sources = [
648 "tools/flags/SkCommandLineFlags.cpp", 658 "tools/flags/SkCommandLineFlags.cpp",
649 ] 659 ]
650 } 660 }
651 test_lib("common_flags") { 661 test_lib("common_flags") {
652 public_include_dirs = [ "tools/flags" ] 662 public_include_dirs = [ "tools/flags" ]
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 "tools/get_images_from_skps.cpp", 897 "tools/get_images_from_skps.cpp",
888 ] 898 ]
889 deps = [ 899 deps = [
890 ":flags", 900 ":flags",
891 ":skia", 901 ":skia",
892 "//third_party/jsoncpp", 902 "//third_party/jsoncpp",
893 ] 903 ]
894 testonly = true 904 testonly = true
895 } 905 }
896 } 906 }
OLDNEW
« no previous file with comments | « no previous file | infra/bots/recipe_modules/flavor/gn_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698