Skip to content

Commit 1a6de65

Browse files
skia flutter#2
1 parent 558680d commit 1a6de65

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

skia/BUILD.gn

Lines changed: 14 additions & 7 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 = []
@@ -431,10 +440,9 @@ optional("gpu") {
431440
} else if (is_win) {
432441
sources += [
433442
"$_skia_root/src/gpu/ganesh/gl/win/GrGLMakeNativeInterface_win.cpp",
443+
"$_skia_root/src/gpu/ganesh/gl/win/GrGLMakeWinInterface.cpp",
434444
]
435-
if (target_cpu != "arm64") {
436-
libs += [ "OpenGL32.lib" ]
437-
}
445+
libs += [ "OpenGL32.lib" ]
438446
} else {
439447
sources +=
440448
[ "$_skia_root/src/gpu/ganesh/gl/GrGLMakeNativeInterface_none.cpp" ]
@@ -446,6 +454,7 @@ optional("gpu") {
446454
if (skia_use_vulkan) {
447455
public += skia_gpu_vk_public
448456
sources += skia_gpu_vk_private
457+
configs += [ ":our_vulkan_headers" ]
449458
if (is_fuchsia) {
450459
public_deps += [ "${fuchsia_sdk}/pkg/vulkan" ]
451460
}
@@ -528,10 +537,8 @@ optional("png_decode") {
528537
]
529538

530539
deps = [ "//flutter/third_party/libpng" ]
531-
sources = [
532-
"$_skia_root/src/codec/SkIcoCodec.cpp",
533-
"$_skia_root/src/codec/SkPngCodec.cpp",
534-
]
540+
sources = [ "$_skia_root/src/codec/SkIcoCodec.cpp" ]
541+
sources += skia_codec_png
535542
}
536543

537544
optional("png_encode") {

0 commit comments

Comments
 (0)