Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0a61043

Browse files
authored
Update Skia build for Vulkan headers (#55143)
Skia has its own set of Vulkan headers which Skia Vulkan sources expect to be compiled against. This internal set of Vulkan headers should not be seen by any users. Instead, users provide their own set of Vulkan headers and Skia's public Vk headers will use the user's Vulkan headers when included in user sources. Unfortunately, this has not been well enforced and Skia is making changes to ensure that Skia's set of Vulkan headers does not leak. This change updates Flutter's build of Skia to be compatible with these Skia changes. Skia-Change: https://skia-review.googlesource.com/c/skia/+/898139
1 parent a21a314 commit 0a61043

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

skia/BUILD.gn

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ skia_library_configs = [
9999
":skia_library",
100100
]
101101

102+
config("our_vulkan_headers") {
103+
include_dirs = [ "include/third_party/vulkan" ]
104+
defines = [ "SK_USE_INTERNAL_VULKAN_HEADERS" ]
105+
}
106+
102107
# Use for CPU-specific Skia code that needs particular compiler flags.
103108
template("opts") {
104109
if (invoker.enabled) {
@@ -351,6 +356,7 @@ optional("fontmgr_win") {
351356
optional("gpu_shared") {
352357
enabled = skia_enable_ganesh
353358

359+
configs = []
354360
deps = []
355361
libs = []
356362
public_defines = []
@@ -364,6 +370,7 @@ optional("gpu_shared") {
364370
if (skia_use_vulkan) {
365371
public_defines += [ "SK_VULKAN" ]
366372
sources += skia_shared_vk_sources
373+
configs += [ ":our_vulkan_headers" ]
367374
if (skia_enable_vulkan_debug_layers) {
368375
public_defines += [ "SK_ENABLE_VK_LAYERS" ]
369376
}
@@ -380,6 +387,8 @@ optional("gpu_shared") {
380387

381388
optional("gpu") {
382389
enabled = skia_enable_ganesh
390+
391+
configs = []
383392
deps = [ ":gpu_shared" ]
384393
public_defines = []
385394
public_configs = []
@@ -445,6 +454,7 @@ optional("gpu") {
445454
if (skia_use_vulkan) {
446455
public += skia_gpu_vk_public
447456
sources += skia_gpu_vk_private
457+
configs += [ ":our_vulkan_headers" ]
448458
if (is_fuchsia) {
449459
public_deps += [ "${fuchsia_sdk}/pkg/vulkan" ]
450460
}

0 commit comments

Comments
 (0)