Avi Drissman | 0987565 | 2022-09-15 20:03:19 | [diff] [blame] | 1 | # Copyright 2019 The Chromium Authors |
Sean Gilhuly | 8602615 | 2019-11-06 16:00:16 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Sunny Sachanandani | fb74c17f | 2023-04-10 21:29:17 | [diff] [blame] | 5 | import("//build/config/features.gni") |
| 6 | import("//printing/buildflags/buildflags.gni") |
Sean Gilhuly | 6f3e0eb4 | 2020-07-09 18:46:31 | [diff] [blame] | 7 | |
Sunny Sachanandani | fb74c17f | 2023-04-10 21:29:17 | [diff] [blame] | 8 | declare_args() { |
Colin Blundell | 8980e7b4 | 2023-12-20 15:08:00 | [diff] [blame] | 9 | # Enable experimental Skia Graphite Dawn backend. Enabled on platforms where |
| 10 | # the team has verified that at least basic rendering to the screen is |
| 11 | # working. |
Colin Blundell | 158a7a418c | 2023-11-23 08:25:00 | [diff] [blame] | 12 | skia_use_dawn = is_mac || is_win || |
| 13 | (is_android && target_cpu != "x86" && target_cpu != "x64") || |
Colin Blundell | 8980e7b4 | 2023-12-20 15:08:00 | [diff] [blame] | 14 | (is_ios && use_blink) || (is_linux && !is_castos) |
Sunny Sachanandani | 0a26ac5b | 2023-05-01 22:05:42 | [diff] [blame] | 15 | |
| 16 | # Enable experimental Skia Graphite Metal backend. Intended only for debugging |
| 17 | # on non-official developer builds. |
Sylvain Defresne | c0176192 | 2023-11-20 17:49:25 | [diff] [blame] | 18 | skia_use_metal = (is_mac || (is_ios && use_blink)) && !is_official_build |
Sunny Sachanandani | fb74c17f | 2023-04-10 21:29:17 | [diff] [blame] | 19 | |
| 20 | # Enable gtests using SkiaRenderer on Skia Graphite. |
Sylvain Defresne | c0176192 | 2023-11-20 17:49:25 | [diff] [blame] | 21 | enable_skia_graphite_gtests = is_mac || (is_ios && use_blink) |
Sean Gilhuly | 8602615 | 2019-11-06 16:00:16 | [diff] [blame] | 22 | } |
Eric Sum | de146e2 | 2021-10-28 19:14:51 | [diff] [blame] | 23 | |
Sunny Sachanandani | fb74c17f | 2023-04-10 21:29:17 | [diff] [blame] | 24 | # Skia only needs to support GPU rasterization if we use the full Chromium |
| 25 | # rendering stack i.e. |use_blink| is true. |
| 26 | # TODO(crbug.com/1431198): Split out into separate enable_skia_ganesh flag. |
| 27 | skia_support_gpu = use_blink |
| 28 | |
| 29 | # Skia Ganesh GL backend is always enabled on all platforms - applies only when |
| 30 | # GPU rasterization is enabled. |
| 31 | skia_use_gl = true |
| 32 | |
Gyuyoung Kim | 80fd49b | 2023-11-07 15:44:22 | [diff] [blame] | 33 | skia_support_pdf = use_blink && (enable_printing || enable_printing_tests) |
Sunny Sachanandani | fb74c17f | 2023-04-10 21:29:17 | [diff] [blame] | 34 | |
Eric Sum | de146e2 | 2021-10-28 19:14:51 | [diff] [blame] | 35 | # Skottie is not used on Android. To keep apk size small the skottie library is |
| 36 | # excluded from the binary. At the time this comment was written, it adds ~200KB |
| 37 | # to the APK. |
| 38 | skia_support_skottie = !is_android |
Christopher Cameron | 4f2c40f | 2023-04-14 14:56:31 | [diff] [blame] | 39 | |
| 40 | # Skia needs XMP support for gainmap HDR image decoding in blink. |
| 41 | skia_support_xmp = use_blink |