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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | infra/bots/recipe_modules/flavor/gn_flavor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index 3c6ac0f462447cd4fbb40ce200843ca91c95bffc..d9f7d79bee4086b9a7f44d644fe634fabdf660b7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -13,6 +13,7 @@ declare_args() {
skia_use_libjpeg_turbo = true
skia_use_libpng = true
skia_use_libwebp = !is_fuchsia
+ skia_use_mesa = false
skia_use_sfntly = !is_fuchsia
skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
skia_use_zlib = true
@@ -595,6 +596,9 @@ if (skia_enable_tools) {
template("test_lib") {
config(target_name + "_config") {
include_dirs = invoker.public_include_dirs
+ if (defined(invoker.public_defines)) {
+ defines = invoker.public_defines
+ }
}
source_set(target_name) {
forward_variables_from(invoker, "*", [ "public_include_dirs" ])
@@ -612,6 +616,7 @@ if (skia_enable_tools) {
}
test_lib("gpu_tool_utils") {
+ public_defines = []
public_include_dirs = [ "tools/gpu" ]
sources = [
"tools/gpu/GrContextFactory.cpp",
@@ -640,6 +645,11 @@ if (skia_enable_tools) {
if (skia_use_vulkan) {
sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
}
+ if (skia_use_mesa) {
+ public_defines += [ "SK_MESA" ]
+ sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
+ libs += [ "OSMesa" ]
+ }
}
test_lib("flags") {
« 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