GN: ANGLE
Angle's existing GN files only work in Chrome, so I've written a new one.
This won't work on Windows, but our GN build doesn't work on Windows anyway. So this CL is an attempt to get a ahead of that curve on ANGLE. It looks large but fairly straightforward.
Now working on Linux:
$ gn gen angle --args=skia_use_angle=true
$ ninja -C angle
$ angle/dm --config angle-gl --src gm -w dm-out
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2361983002
Review-Url: https://codereview.chromium.org/2361983002
diff --git a/BUILD.gn b/BUILD.gn
index 26a23be..66795fd 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -10,6 +10,7 @@
}
declare_args() {
+ skia_use_angle = false
skia_use_expat = true
skia_use_fontconfig = is_linux
skia_use_freetype = is_android || is_fuchsia || is_linux
@@ -631,6 +632,8 @@
if (skia_enable_gpu) {
public_defines = []
public_include_dirs += [ "tools/gpu" ]
+
+ deps = []
sources = [
"tools/gpu/GrContextFactory.cpp",
"tools/gpu/GrTest.cpp",
@@ -656,14 +659,19 @@
sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
}
- if (skia_use_vulkan) {
- sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
+ if (skia_use_angle) {
+ public_defines += [ "SK_ANGLE" ]
+ deps += [ "//third_party/angle2" ]
+ sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
}
if (skia_use_mesa) {
public_defines += [ "SK_MESA" ]
sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
libs += [ "OSMesa" ]
}
+ if (skia_use_vulkan) {
+ sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
+ }
}
}