aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json2
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json2
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json2
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json2
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json2
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json130
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/big_issue_number.json1
-rw-r--r--infra/bots/recipes/swarm_perf.expected/recipe_with_gerrit_patch.json2
-rw-r--r--infra/bots/recipes/swarm_perf.py6
-rw-r--r--infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json2
-rw-r--r--infra/bots/recipes/swarm_test.py3
-rw-r--r--tests/TestConfigParsing.cpp63
-rw-r--r--tools/flags/SkCommonFlagsConfig.cpp126
-rw-r--r--tools/flags/SkCommonFlagsConfig.h2
-rw-r--r--tools/gpu/GrContextFactory.cpp23
-rw-r--r--tools/gpu/GrContextFactory.h44
-rw-r--r--tools/gpu/gl/angle/GLTestContext_angle.cpp93
-rw-r--r--tools/gpu/gl/angle/GLTestContext_angle.h22
25 files changed, 228 insertions, 306 deletions
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json
index a3d7c8bf55..0ecdd40c2f 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android.json
@@ -363,7 +363,7 @@
"python",
"-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc",
+ "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh"
],
"name": "write nanobench.sh"
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json
index 02071babf4..6fe42c9de4 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android.json
@@ -385,7 +385,7 @@
"python",
"-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 esinst --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Adreno420 extra_config GN_Android model Nexus6 os Android; echo $? >/data/local/tmp/rc",
+ "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 esinst --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Adreno420 extra_config GN_Android model Nexus6 os Android; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh"
],
"name": "write nanobench.sh"
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json
index 7adc031ae5..5afb62cfd6 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android.json
@@ -385,7 +385,7 @@
"python",
"-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android; echo $? >/data/local/tmp/rc",
+ "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh"
],
"name": "write nanobench.sh"
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json
index a31ad42eb1..45c64d362d 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android.json
@@ -385,7 +385,7 @@
"python",
"-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering hwui f16 srgb --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~interlaced1.png ~interlaced2.png ~interlaced3.png ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android model NexusPlayer os Android; echo $? >/data/local/tmp/rc",
+ "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~interlaced1.png ~interlaced2.png ~interlaced3.png ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android model NexusPlayer os Android; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh"
],
"name": "write nanobench.sh"
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json b/infra/bots/recipes/swarm_perf.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json
index f081e8a7a3..3731a892fa 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN.json
@@ -124,6 +124,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json b/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json
index ff65fe1b37..bdd4ae3eab 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN.json
@@ -125,6 +125,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json b/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json
index 5e7b7d6d0e..b01ae39514 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json
@@ -134,6 +134,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
@@ -230,6 +231,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench.json b/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench.json
index 44c5735d26..14bbf305e9 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench.json
@@ -128,6 +128,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json b/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json
index 081f0a4a18..a2d86e034c 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug.json
@@ -80,6 +80,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json b/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json
index 740635c01e..08cb4c8f1a 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release.json
@@ -124,6 +124,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json b/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json
deleted file mode 100644
index 500d64596b..0000000000
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json
+++ /dev/null
@@ -1,130 +0,0 @@
-[
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "[SLAVE_BUILD]\\skia\\infra\\bots\\assets\\skp\\VERSION",
- "/path/to/tmp/"
- ],
- "name": "Get downloaded SKP VERSION"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "42",
- "[SLAVE_BUILD]\\tmp\\SKP_VERSION"
- ],
- "name": "write SKP_VERSION"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "[SLAVE_BUILD]\\skia\\infra\\bots\\assets\\skimage\\VERSION",
- "/path/to/tmp/"
- ],
- "name": "Get downloaded skimage VERSION"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "42",
- "[SLAVE_BUILD]\\tmp\\SK_IMAGE_VERSION"
- ],
- "name": "write SK_IMAGE_VERSION"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "[SLAVE_BUILD]\\skia\\infra\\bots\\assets\\svg\\VERSION",
- "/path/to/tmp/"
- ],
- "name": "Get downloaded SVG VERSION"
- },
- {
- "cmd": [
- "python",
- "-u",
- "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
- "42",
- "[SLAVE_BUILD]\\tmp\\SVG_VERSION"
- ],
- "name": "write SVG_VERSION"
- },
- {
- "cmd": [
- "[SLAVE_BUILD]\\out\\Debug_x64\\nanobench",
- "--undefok",
- "-i",
- "[SLAVE_BUILD]\\skia\\resources",
- "--skps",
- "[SLAVE_BUILD]\\skp",
- "--svgs",
- "[SLAVE_BUILD]\\svg",
- "--images",
- "[SLAVE_BUILD]\\skimage\\nanobench",
- "--nocpu",
- "--pre_log",
- "--images",
- "--gpuStatsDump",
- "true",
- "--scales",
- "1.0",
- "1.1",
- "--config",
- "8888",
- "gpu",
- "nonrendering",
- "hwui",
- "f16",
- "srgb",
- "msaa16",
- "nvpr16",
- "nvprdit16",
- "angle_gl_es2",
- "angle_d3d11_es2",
- "--match",
- "~interlaced1.png",
- "~interlaced2.png",
- "~interlaced3.png",
- "~inc0.gif",
- "~inc1.gif",
- "~incInterlaced.gif",
- "~inc0.jpg",
- "~incGray.jpg",
- "~inc0.wbmp",
- "~inc1.wbmp",
- "~inc0.webp",
- "~inc1.webp",
- "~inc0.ico",
- "~inc1.ico",
- "~inc0.png",
- "~inc1.png",
- "~inc2.png",
- "~inc12.png",
- "~inc13.png",
- "~inc14.png",
- "~inc0.webp",
- "~inc1.webp"
- ],
- "env": {
- "BUILDTYPE": "Debug_x64",
- "CHROME_HEADLESS": "1",
- "SKIA_OUT": "[SLAVE_BUILD]\\out"
- },
- "name": "nanobench"
- },
- {
- "name": "$result",
- "recipe_result": null,
- "status_code": 0
- }
-] \ No newline at end of file
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json b/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json
index c6c9c52bff..d2949f0d0f 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot.json
@@ -127,6 +127,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json b/infra/bots/recipes/swarm_perf.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json
index 93fe29340b..cf95f97e7a 100644
--- a/infra/bots/recipes/swarm_perf.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json
+++ b/infra/bots/recipes/swarm_perf.expected/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json
@@ -355,6 +355,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/big_issue_number.json b/infra/bots/recipes/swarm_perf.expected/big_issue_number.json
index b3812dc21e..ca8799361f 100644
--- a/infra/bots/recipes/swarm_perf.expected/big_issue_number.json
+++ b/infra/bots/recipes/swarm_perf.expected/big_issue_number.json
@@ -127,6 +127,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.expected/recipe_with_gerrit_patch.json b/infra/bots/recipes/swarm_perf.expected/recipe_with_gerrit_patch.json
index e562f87e22..1686597576 100644
--- a/infra/bots/recipes/swarm_perf.expected/recipe_with_gerrit_patch.json
+++ b/infra/bots/recipes/swarm_perf.expected/recipe_with_gerrit_patch.json
@@ -156,6 +156,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
@@ -258,6 +259,7 @@
"8888",
"gpu",
"nonrendering",
+ "angle",
"hwui",
"f16",
"srgb",
diff --git a/infra/bots/recipes/swarm_perf.py b/infra/bots/recipes/swarm_perf.py
index a7148b06d8..fb8838c047 100644
--- a/infra/bots/recipes/swarm_perf.py
+++ b/infra/bots/recipes/swarm_perf.py
@@ -38,7 +38,6 @@ TEST_BUILDERS = {
'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug',
'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release',
'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot',
- 'Perf-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
],
},
@@ -63,7 +62,7 @@ def nanobench_flags(bot):
if 'iOS' in bot:
args.extend(['--skps', 'ignore_skps'])
- config = ['8888', 'gpu', 'nonrendering', 'hwui' ]
+ config = ['8888', 'gpu', 'nonrendering', 'angle', 'hwui' ]
if 'AndroidOne' not in bot:
config += [ 'f16', 'srgb' ]
if '-GCE-' in bot:
@@ -96,9 +95,6 @@ def nanobench_flags(bot):
if 'Vulkan' in bot:
config = ['vk']
- if 'ANGLE' in bot:
- config.extend(['angle_gl_es2', 'angle_d3d11_es2'])
-
args.append('--config')
args.extend(config)
diff --git a/infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json b/infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json
index 311d43f74b..d382fe0ee0 100644
--- a/infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json
+++ b/infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json
@@ -225,8 +225,6 @@
"gpusrgb",
"pdf",
"msaa16",
- "angle_gl_es2",
- "angle_d3d11_es2",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
diff --git a/infra/bots/recipes/swarm_test.py b/infra/bots/recipes/swarm_test.py
index 760c9d5236..9876f84627 100644
--- a/infra/bots/recipes/swarm_test.py
+++ b/infra/bots/recipes/swarm_test.py
@@ -70,9 +70,6 @@ def dm_flags(bot):
else:
configs.append('msaa16')
- if 'ANGLE' in bot:
- configs.extend(['angle_gl_es2', 'angle_d3d11_es2'])
-
# With msaa, the S4 crashes and the NP produces a long error stream when we
# run with MSAA. The Tegra2 and Tegra3 just don't support it. No record of
# why we're not running msaa on iOS, probably started with gpu config and just
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 4d7e5cad0e..8435b99ce5 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -77,9 +77,9 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16", "msaa4",
"nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvprdit4", "pdf", "skp",
- "svg", "xps", "angle_d3d11_es2", "angle_gl_es2", "commandbuffer", "mesa", "hwui", "gpuf16",
- "gpusrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk", "glinst", "glinst4",
- "glinstdit4", "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit4", "glwide"
+ "svg", "xps", "angle", "angle-gl", "commandbuffer", "mesa", "hwui", "gpuf16", "gpusrgb",
+ "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk", "glinst", "glinst4", "glinstdit4",
+ "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit4", "glwide"
});
SkCommandLineConfigArray configs;
@@ -167,8 +167,18 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getSamples() == 4);
+
+#if SK_ANGLE
+#ifdef SK_BUILD_FOR_WIN
REPORTER_ASSERT(reporter, configs[20]->asConfigGpu());
+#else
+ REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu());
+#endif
REPORTER_ASSERT(reporter, configs[21]->asConfigGpu());
+#else
+ REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu());
+ REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu());
+#endif
REPORTER_ASSERT(reporter, configs[22]->asConfigGpu());
#if SK_MESA
REPORTER_ASSERT(reporter, configs[23]->asConfigGpu());
@@ -197,8 +207,8 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"gpu[nvpr=true,dit=false]",
- "gpu[api=angle_d3d9_es2]",
- "gpu[api=angle_gl_es3]",
+ "gpu[api=angle]",
+ "gpu[api=angle-gl]",
"gpu[api=mesa,samples=77]",
"gpu[dit=true,api=commandbuffer]",
"gpu[]",
@@ -219,12 +229,19 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
+#if SK_ANGLE
+#ifdef SK_BUILD_FOR_WIN
REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()->getContextType() ==
- GrContextFactory::kANGLE_D3D9_ES2_ContextType);
- REPORTER_ASSERT(reporter, configs[1]->asConfigGpu());
+ GrContextFactory::kANGLE_ContextType);
+#else
+ REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
+#endif
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() ==
- GrContextFactory::kANGLE_GL_ES3_ContextType);
- REPORTER_ASSERT(reporter, configs[2]->asConfigGpu());
+ GrContextFactory::kANGLE_GL_ContextType);
+#else
+ REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
+ REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu());
+#endif
#if SK_MESA
REPORTER_ASSERT(reporter, configs[3]->asConfigGpu()->getContextType() ==
GrContextFactory::kMESA_ContextType);
@@ -263,7 +280,7 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"gpu[nvpr=1]", // Number as bool.
"gpu[api=gl,]", // Trailing in comma.
- "gpu[api=angle_glu]", // Unknown api.
+ "gpu[api=angle-glu]", // Unknown api.
"gpu[api=,samples=0]", // Empty api.
"gpu[samples=true]", // Value true as a number.
"gpu[samples=0,samples=0]", // Duplicate option key.
@@ -312,7 +329,7 @@ DEF_TEST(ParseConfigs_ViaParsing, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"a-b-c-8888",
"zz-qq-gpu",
- "a-angle_gl_es2"
+ "a-angle-gl"
});
SkCommandLineConfigArray configs;
@@ -323,7 +340,12 @@ DEF_TEST(ParseConfigs_ViaParsing, reporter) {
} expectedConfigs[] = {
{"8888", {"a", "b", "c"}},
{"gpu", {"zz", "qq", nullptr}},
- {"gpu", { "a", nullptr, nullptr }}
+#if SK_ANGLE
+ { "gpu",{ "a", nullptr, nullptr } } // With SK_ANGLE, angle-gl becomes gpu(api=angle-gl)
+#else
+ { "angle-gl",{ "a", nullptr, nullptr } } // The angle-gl tag is only tag that contains
+ // hyphen.
+#endif
};
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
@@ -342,9 +364,8 @@ DEF_TEST(ParseConfigs_ViaParsing, reporter) {
DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"zz-qq-gpu[api=gles]",
- "abc-nbc-cbs-gpu[api=angle_d3d9_es2,samples=1]",
"a-gpu[samples=1",
- "abc-def-angle_gl_es2[samples=1]",
+ "abc-def-angle-gl[samples=1]",
});
SkCommandLineConfigArray configs;
@@ -355,16 +376,13 @@ DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) {
} expectedConfigs[] = {
#if SK_SUPPORT_GPU
{"gpu", {"zz", "qq", nullptr}},
- {"gpu", {"abc", "nbc", "cbs"}},
#else
{"gpu[api=gles]", {"zz", "qq", nullptr}},
- {"gpu[api=angle_d3d9_es2,samples=1]", {"abc", "nbc", "cbs"}},
#endif
- {"gpu[samples=1", {"a", nullptr, nullptr}}, // Missing bracket makes this is not extended
- // form but via still works as expected.
- {"angle_gl_es2[samples=1]", {"abc", "def", nullptr}} // This is not extended form.
- // angle_gl_es2 is an api type not a
- // backend.
+ {"gpu[samples=1", {"a", nullptr, nullptr}}, // This is not extended form, but via still
+ // works as expected.
+ {"gl[samples=1]", {"abc", "def", "angle"}} // This is not extended form. Also
+ // angle-gl is not a "backend" in this case.
};
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
@@ -381,8 +399,7 @@ DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) {
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[1]->asConfigGpu());
+ REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu());
- REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu());
#endif
}
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp
index 808b2bf2cb..14084ce0e0 100644
--- a/tools/flags/SkCommonFlagsConfig.cpp
+++ b/tools/flags/SkCommonFlagsConfig.cpp
@@ -16,8 +16,10 @@ using sk_gpu_test::GrContextFactory;
static const char defaultConfigs[] =
"8888 gpu nonrendering"
-#if defined(SK_BUILD_FOR_WIN)
- " angle_d3d11_es2"
+#if SK_ANGLE
+#ifdef SK_BUILD_FOR_WIN
+ " angle"
+#endif
#endif
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
" hwui"
@@ -30,46 +32,50 @@ static const struct {
const char* options;
} gPredefinedConfigs[] ={
#if SK_SUPPORT_GPU
- { "gpu", "gpu", "" },
- { "gl", "gpu", "api=gl" },
- { "msaa4", "gpu", "samples=4" },
- { "glmsaa4", "gpu", "api=gl,samples=4" },
- { "msaa16", "gpu", "samples=16" },
- { "nvpr4", "gpu", "nvpr=true,samples=4" },
- { "glnvpr4", "gpu", "api=gl,nvpr=true,samples=4" },
- { "nvpr16", "gpu", "nvpr=true,samples=16" },
- { "nvprdit4", "gpu", "nvpr=true,samples=4,dit=true" },
- { "glnvprdit4", "gpu", "api=gl,nvpr=true,samples=4,dit=true" },
- { "nvprdit16", "gpu", "nvpr=true,samples=16,dit=true" },
- { "glinst", "gpu", "api=gl,inst=true" },
- { "glinst4", "gpu", "api=gl,inst=true,samples=4" },
- { "glinstdit4", "gpu", "api=gl,inst=true,samples=4,dit=true" },
- { "glinst16", "gpu", "api=gl,inst=true,samples=16" },
- { "glinstdit16", "gpu", "api=gl,inst=true,samples=16,dit=true" },
- { "esinst", "gpu", "api=gles,inst=true" },
- { "esinst4", "gpu", "api=gles,inst=true,samples=4" },
- { "esinstdit4", "gpu", "api=gles,inst=true,samples=4,dit=true" },
- { "gpuf16", "gpu", "color=f16" },
- { "gpusrgb", "gpu", "color=srgb" },
- { "glsrgb", "gpu", "api=gl,color=srgb" },
- { "glwide", "gpu", "api=gl,color=f16_wide" },
- { "gpudft", "gpu", "dit=true" },
- { "gpudebug", "gpu", "api=debug" },
- { "gpunull", "gpu", "api=null" },
- { "debug", "gpu", "api=debug" },
- { "nullgpu", "gpu", "api=null" },
- { "angle_d3d11_es2", "gpu", "api=angle_d3d11_es2" },
- { "angle_gl_es2", "gpu", "api=angle_gl_es2" },
- { "commandbuffer", "gpu", "api=commandbuffer" }
+ { "gpu", "gpu", "" },
+ { "gl", "gpu", "api=gl" },
+ { "msaa4", "gpu", "samples=4" },
+ { "glmsaa4", "gpu", "api=gl,samples=4" },
+ { "msaa16", "gpu", "samples=16" },
+ { "nvpr4", "gpu", "nvpr=true,samples=4" },
+ { "glnvpr4", "gpu", "api=gl,nvpr=true,samples=4" },
+ { "nvpr16", "gpu", "nvpr=true,samples=16" },
+ { "nvprdit4", "gpu", "nvpr=true,samples=4,dit=true" },
+ { "glnvprdit4", "gpu", "api=gl,nvpr=true,samples=4,dit=true" },
+ { "nvprdit16", "gpu", "nvpr=true,samples=16,dit=true" },
+ { "glinst", "gpu", "api=gl,inst=true" },
+ { "glinst4", "gpu", "api=gl,inst=true,samples=4" },
+ { "glinstdit4", "gpu", "api=gl,inst=true,samples=4,dit=true" },
+ { "glinst16", "gpu", "api=gl,inst=true,samples=16" },
+ { "glinstdit16", "gpu", "api=gl,inst=true,samples=16,dit=true" },
+ { "esinst", "gpu", "api=gles,inst=true" },
+ { "esinst4", "gpu", "api=gles,inst=true,samples=4" },
+ { "esinstdit4", "gpu", "api=gles,inst=true,samples=4,dit=true" },
+ { "gpuf16", "gpu", "color=f16" },
+ { "gpusrgb", "gpu", "color=srgb" },
+ { "glsrgb", "gpu", "api=gl,color=srgb" },
+ { "glwide", "gpu", "api=gl,color=f16_wide" },
+ { "gpudft", "gpu", "dit=true" },
+ { "gpudebug", "gpu", "api=debug" },
+ { "gpunull", "gpu", "api=null" },
+ { "debug", "gpu", "api=debug" },
+ { "nullgpu", "gpu", "api=null" }
+#if SK_ANGLE
+#ifdef SK_BUILD_FOR_WIN
+ ,{ "angle", "gpu", "api=angle" }
+#endif
+ ,{ "angle-gl", "gpu", "api=angle-gl" }
+#endif
+ ,{ "commandbuffer", "gpu", "api=commandbuffer" }
#if SK_MESA
- ,{ "mesa", "gpu", "api=mesa" }
+ ,{ "mesa", "gpu", "api=mesa" }
#endif
#ifdef SK_VULKAN
- ,{ "vk", "gpu", "api=vulkan" }
- ,{ "vksrgb", "gpu", "api=vulkan,color=srgb" }
- ,{ "vkwide", "gpu", "api=vulkan,color=f16_wide" }
- ,{ "vkmsaa4", "gpu", "api=vulkan,samples=4" }
- ,{ "vkmsaa16", "gpu", "api=vulkan,samples=16" }
+ ,{ "vk", "gpu", "api=vulkan" }
+ ,{ "vksrgb", "gpu", "api=vulkan,color=srgb" }
+ ,{ "vkwide", "gpu", "api=vulkan,color=f16_wide" }
+ ,{ "vkmsaa4", "gpu", "api=vulkan,samples=4" }
+ ,{ "vkmsaa16", "gpu", "api=vulkan,samples=16" }
#endif
#else
@@ -108,11 +114,12 @@ static const char configExtendedHelp[] =
"\t\tgles \t\t\tUse OpenGL ES.\n"
"\t\tdebug \t\t\tUse debug OpenGL.\n"
"\t\tnull \t\t\tUse null OpenGL.\n"
- "\t\tangle_d3d9_es2\t\t\tUse OpenGL ES2 on the ANGLE Direct3D9 backend.\n"
- "\t\tangle_d3d11_es2\t\t\tUse OpenGL ES2 on the ANGLE Direct3D11 backend.\n"
- "\t\tangle_d3d11_es3\t\t\tUse OpenGL ES3 on the ANGLE Direct3D11 backend.\n"
- "\t\tangle_gl_es2\t\t\tUse OpenGL ES2 on the ANGLE OpenGL backend.\n"
- "\t\tangle_gl_es3\t\t\tUse OpenGL ES3 on the ANGLE OpenGL backend.\n"
+#if SK_ANGLE
+#ifdef SK_BUILD_FOR_WIN
+ "\t\tangle\t\t\tUse ANGLE DirectX.\n"
+#endif
+ "\t\tangle-gl\t\t\tUse ANGLE OpenGL.\n"
+#endif
"\t\tcommandbuffer\t\tUse command buffer.\n"
#if SK_MESA
"\t\tmesa\t\t\tUse MESA.\n"
@@ -226,26 +233,18 @@ static bool parse_option_gpu_api(const SkString& value,
*outContextType = GrContextFactory::kNullGL_ContextType;
return true;
}
- if (value.equals("angle_d3d9_es2")) {
- *outContextType = GrContextFactory::kANGLE_D3D9_ES2_ContextType;
- return true;
- }
- if (value.equals("angle_d3d11_es2")) {
- *outContextType = GrContextFactory::kANGLE_D3D11_ES2_ContextType;
- return true;
- }
- if (value.equals("angle_d3d11_es3")) {
- *outContextType = GrContextFactory::kANGLE_D3D11_ES3_ContextType;
- return true;
- }
- if (value.equals("angle_gl_es2")) {
- *outContextType = GrContextFactory::kANGLE_GL_ES2_ContextType;
+#if SK_ANGLE
+#ifdef SK_BUILD_FOR_WIN
+ if (value.equals("angle")) {
+ *outContextType = GrContextFactory::kANGLE_ContextType;
return true;
}
- if (value.equals("angle_gl_es3")) {
- *outContextType = GrContextFactory::kANGLE_GL_ES3_ContextType;
+#endif
+ if (value.equals("angle-gl")) {
+ *outContextType = GrContextFactory::kANGLE_GL_ContextType;
return true;
}
+#endif
if (value.equals("commandbuffer")) {
*outContextType = GrContextFactory::kCommandBuffer_ContextType;
return true;
@@ -407,6 +406,13 @@ void ParseConfigs(const SkCommandLineFlags::StringArray& configs,
simpleBackend = vias[vias.count() - 1];
vias.pop_back();
}
+ // Note: no #if SK_ANGLE: this is a special rule in the via-tag grammar.
+ if (vias.count() && simpleBackend.equals("gl") &&
+ vias[vias.count() - 1].equals("angle")) {
+ simpleBackend = "angle-gl";
+ vias.pop_back();
+ }
+
for (auto& predefinedConfig : gPredefinedConfigs) {
if (simpleBackend.equals(predefinedConfig.predefinedConfig)) {
extendedBackend = predefinedConfig.backend;
diff --git a/tools/flags/SkCommonFlagsConfig.h b/tools/flags/SkCommonFlagsConfig.h
index 9abf4cb5df..e817339c6e 100644
--- a/tools/flags/SkCommonFlagsConfig.h
+++ b/tools/flags/SkCommonFlagsConfig.h
@@ -24,7 +24,7 @@ class SkCommandLineConfigGpu;
// The string has following form:
// tag:
// [via-]*backend
-// where 'backend' consists of chars excluding hyphen
+// where 'backend' consists of chars excluding hyphen or "angle-gl"
// and each 'via' consists of chars excluding hyphen.
class SkCommandLineConfig {
public:
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index 4f189942bd..5e6494f778 100644
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -117,24 +117,13 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op
glCtx = CreatePlatformGLTestContext(kGLES_GrGLStandard);
break;
#if SK_ANGLE
- case kANGLE_D3D9_ES2_ContextType:
- glCtx = CreateANGLETestContext(ANGLEBackend::kD3D9, ANGLEContextVersion::kES2);
+# ifdef SK_BUILD_FOR_WIN
+ case kANGLE_ContextType:
+ glCtx = CreateANGLEDirect3DGLTestContext();
break;
- case kANGLE_D3D11_ES2_ContextType:
- glCtx = CreateANGLETestContext(ANGLEBackend::kD3D11,
- ANGLEContextVersion::kES2);
- break;
- case kANGLE_D3D11_ES3_ContextType:
- glCtx = CreateANGLETestContext(ANGLEBackend::kD3D11,
- ANGLEContextVersion::kES3);
- break;
- case kANGLE_GL_ES2_ContextType:
- glCtx = CreateANGLETestContext(ANGLEBackend::kOpenGL,
- ANGLEContextVersion::kES2);
- break;
- case kANGLE_GL_ES3_ContextType:
- glCtx = CreateANGLETestContext(ANGLEBackend::kOpenGL,
- ANGLEContextVersion::kES3);
+# endif
+ case kANGLE_GL_ContextType:
+ glCtx = CreateANGLEOpenGLGLTestContext();
break;
#endif
case kCommandBuffer_ContextType:
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
index d6baffc0ea..a822ac7868 100644
--- a/tools/gpu/GrContextFactory.h
+++ b/tools/gpu/GrContextFactory.h
@@ -68,18 +68,15 @@ public:
// The availability of context types is subject to platform and build configuration
// restrictions.
enum ContextType {
- kGL_ContextType, //! OpenGL context.
- kGLES_ContextType, //! OpenGL ES context.
- kANGLE_D3D9_ES2_ContextType, //! ANGLE on Direct3D9 OpenGL ES 2 context.
- kANGLE_D3D11_ES2_ContextType,//! ANGLE on Direct3D11 OpenGL ES 2 context.
- kANGLE_D3D11_ES3_ContextType,//! ANGLE on Direct3D11 OpenGL ES 3 context.
- kANGLE_GL_ES2_ContextType, //! ANGLE on OpenGL OpenGL ES 2 context.
- kANGLE_GL_ES3_ContextType, //! ANGLE on OpenGL OpenGL ES 3 context.
- kCommandBuffer_ContextType, //! Chromium command buffer OpenGL ES context.
- kMESA_ContextType, //! MESA OpenGL context
- kNullGL_ContextType, //! Non-rendering OpenGL mock context.
- kDebugGL_ContextType, //! Non-rendering, state verifying OpenGL context.
- kVulkan_ContextType, //! Vulkan
+ kGL_ContextType, //! OpenGL context.
+ kGLES_ContextType, //! OpenGL ES context.
+ kANGLE_ContextType, //! ANGLE on DirectX OpenGL ES context.
+ kANGLE_GL_ContextType, //! ANGLE on OpenGL OpenGL ES context.
+ kCommandBuffer_ContextType, //! Chromium command buffer OpenGL ES context.
+ kMESA_ContextType, //! MESA OpenGL context
+ kNullGL_ContextType, //! Non-rendering OpenGL mock context.
+ kDebugGL_ContextType, //! Non-rendering, state verifying OpenGL context.
+ kVulkan_ContextType, //! Vulkan
kLastContextType = kVulkan_ContextType
};
@@ -130,6 +127,29 @@ public:
}
}
+ static const char* ContextTypeName(ContextType type) {
+ switch (type) {
+ case kGL_ContextType:
+ return "gl";
+ case kGLES_ContextType:
+ return "gles";
+ case kANGLE_ContextType:
+ return "angle";
+ case kANGLE_GL_ContextType:
+ return "angle-gl";
+ case kCommandBuffer_ContextType:
+ return "commandbuffer";
+ case kMESA_ContextType:
+ return "mesa";
+ case kNullGL_ContextType:
+ return "nullgl";
+ case kDebugGL_ContextType:
+ return "debuggl";
+ case kVulkan_ContextType:
+ return "vulkan";
+ }
+ }
+
explicit GrContextFactory(const GrContextOptions& opts);
GrContextFactory();
diff --git a/tools/gpu/gl/angle/GLTestContext_angle.cpp b/tools/gpu/gl/angle/GLTestContext_angle.cpp
index 186e70e054..8cc6f99c9f 100644
--- a/tools/gpu/gl/angle/GLTestContext_angle.cpp
+++ b/tools/gpu/gl/angle/GLTestContext_angle.cpp
@@ -26,9 +26,6 @@
#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D
-using sk_gpu_test::ANGLEBackend;
-using sk_gpu_test::ANGLEContextVersion;
-
namespace {
struct Libs {
void* fGLLib;
@@ -48,7 +45,7 @@ static GrGLFuncPtr angle_get_gl_proc(void* ctx, const char name[]) {
return eglGetProcAddress(name);
}
-void* get_angle_egl_display(void* nativeDisplay, ANGLEBackend type) {
+void* get_angle_egl_display(void* nativeDisplay, bool useGLBackend) {
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT;
eglGetPlatformDisplayEXT =
(PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress("eglGetPlatformDisplayEXT");
@@ -58,25 +55,38 @@ void* get_angle_egl_display(void* nativeDisplay, ANGLEBackend type) {
return EGL_NO_DISPLAY;
}
- EGLint typeNum;
- switch (type) {
- case ANGLEBackend::kD3D9:
- typeNum = EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE;
- break;
- case ANGLEBackend::kD3D11:
- typeNum = EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE;
- break;
- case ANGLEBackend::kOpenGL:
- typeNum = EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE;
- break;
+ EGLDisplay display = EGL_NO_DISPLAY;
+ if (useGLBackend) {
+ EGLint attribs[3] = {
+ EGL_PLATFORM_ANGLE_TYPE_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE,
+ EGL_NONE
+ };
+ display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, nativeDisplay, attribs);
+ } else {
+ // Try for an ANGLE D3D11 context, fall back to D3D9.
+ EGLint attribs[3][3] = {
+ {
+ EGL_PLATFORM_ANGLE_TYPE_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
+ EGL_NONE
+ },
+ {
+ EGL_PLATFORM_ANGLE_TYPE_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE,
+ EGL_NONE
+ },
+ };
+ for (int i = 0; i < 3 && display == EGL_NO_DISPLAY; ++i) {
+ display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE,nativeDisplay, attribs[i]);
+ }
}
- const EGLint attribs[] = { EGL_PLATFORM_ANGLE_TYPE_ANGLE, typeNum, EGL_NONE };
- return eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, nativeDisplay, attribs);
+ return display;
}
class ANGLEGLContext : public sk_gpu_test::GLTestContext {
public:
- ANGLEGLContext(ANGLEBackend, ANGLEContextVersion);
+ ANGLEGLContext(bool preferGLBackend);
~ANGLEGLContext() override;
GrEGLImage texture2DToEGLImage(GrGLuint texID) const override;
@@ -91,19 +101,16 @@ private:
void onPlatformSwapBuffers() const override;
GrGLFuncPtr onPlatformGetProcAddress(const char* name) const override;
- void* fContext;
- void* fDisplay;
- void* fSurface;
- ANGLEBackend fType;
- ANGLEContextVersion fVersion;
+ void* fContext;
+ void* fDisplay;
+ void* fSurface;
+ bool fIsGLBackend;
};
-ANGLEGLContext::ANGLEGLContext(ANGLEBackend type, ANGLEContextVersion version)
+ANGLEGLContext::ANGLEGLContext(bool useGLBackend)
: fContext(EGL_NO_CONTEXT)
, fDisplay(EGL_NO_DISPLAY)
- , fSurface(EGL_NO_SURFACE)
- , fType(type)
- , fVersion(version) {
+ , fSurface(EGL_NO_SURFACE) {
EGLint numConfigs;
static const EGLint configAttribs[] = {
@@ -116,7 +123,8 @@ ANGLEGLContext::ANGLEGLContext(ANGLEBackend type, ANGLEContextVersion version)
EGL_NONE
};
- fDisplay = get_angle_egl_display(EGL_DEFAULT_DISPLAY, type);
+ fIsGLBackend = useGLBackend;
+ fDisplay = get_angle_egl_display(EGL_DEFAULT_DISPLAY, useGLBackend);
if (EGL_NO_DISPLAY == fDisplay) {
SkDebugf("Could not create EGL display!");
return;
@@ -129,9 +137,8 @@ ANGLEGLContext::ANGLEGLContext(ANGLEBackend type, ANGLEContextVersion version)
EGLConfig surfaceConfig;
eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs);
- int versionNum = ANGLEContextVersion::kES2 == version ? 2 : 3;
- const EGLint contextAttribs[] = {
- EGL_CONTEXT_CLIENT_VERSION, versionNum,
+ static const EGLint contextAttribs[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
fContext = eglCreateContext(fDisplay, surfaceConfig, nullptr, contextAttribs);
@@ -217,7 +224,13 @@ GrGLuint ANGLEGLContext::eglImageToExternalTexture(GrEGLImage image) const {
}
sk_gpu_test::GLTestContext* ANGLEGLContext::createNew() const {
- sk_gpu_test::GLTestContext* ctx = sk_gpu_test::CreateANGLETestContext(fType, fVersion);
+#ifdef SK_BUILD_FOR_WIN
+ sk_gpu_test::GLTestContext* ctx = fIsGLBackend
+ ? sk_gpu_test::CreateANGLEOpenGLGLTestContext()
+ : sk_gpu_test::CreateANGLEDirect3DGLTestContext();
+#else
+ sk_gpu_test::GLTestContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLTestContext();
+#endif
if (ctx) {
ctx->makeCurrent();
}
@@ -286,9 +299,19 @@ const GrGLInterface* CreateANGLEGLInterface() {
return GrGLAssembleGLESInterface(&gLibs, angle_get_gl_proc);
}
-GLTestContext* CreateANGLETestContext(ANGLEBackend type,
- ANGLEContextVersion version) {
- ANGLEGLContext* ctx = new ANGLEGLContext(type, version);
+#ifdef SK_BUILD_FOR_WIN
+GLTestContext* CreateANGLEDirect3DGLTestContext() {
+ ANGLEGLContext* ctx = new ANGLEGLContext(false);
+ if (!ctx->isValid()) {
+ delete ctx;
+ return NULL;
+ }
+ return ctx;
+ }
+#endif
+
+GLTestContext* CreateANGLEOpenGLGLTestContext() {
+ ANGLEGLContext* ctx = new ANGLEGLContext(true);
if (!ctx->isValid()) {
delete ctx;
return NULL;
diff --git a/tools/gpu/gl/angle/GLTestContext_angle.h b/tools/gpu/gl/angle/GLTestContext_angle.h
index 0da747f30f..0140477a54 100644
--- a/tools/gpu/gl/angle/GLTestContext_angle.h
+++ b/tools/gpu/gl/angle/GLTestContext_angle.h
@@ -13,24 +13,18 @@
namespace sk_gpu_test {
/**
- * Creates a GrGLInterface for the current ANGLE GLES Context. Here current means bound in ANGLE's
- * implementation of EGL.
+ * Creates a GrGLInterface for the currently ANGLE GL context currently bound in ANGLE's EGL
+ * implementation.
*/
const GrGLInterface* CreateANGLEGLInterface();
-enum class ANGLEBackend {
- kD3D9,
- kD3D11,
- kOpenGL
-};
-
-enum class ANGLEContextVersion {
- kES2,
- kES3
-};
+#ifdef SK_BUILD_FOR_WIN
+/** Creates a GLTestContext backed by ANGLE's Direct3D backend. */
+GLTestContext* CreateANGLEDirect3DGLTestContext();
+#endif
-/** Creates a GLTestContext backed by ANGLE. */
-GLTestContext* CreateANGLETestContext(ANGLEBackend, ANGLEContextVersion);
+/** Creates a GLTestContext backed by ANGLE's OpenGL backend. */
+GLTestContext* CreateANGLEOpenGLGLTestContext();
} // namespace sk_gpu_test
#endif