Commit 8fe9a746 authored by Stephen White's avatar Stephen White Committed by Commit Bot

Add Skia's Dawn backend as a compile-time option in Chrome.

Change-Id: I5c5b27bdf1923aa3d0b3a6fb2fb36d3ce1fcb733
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864361
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709071}
parent 0890b95a
...@@ -26,6 +26,7 @@ skia_support_skottie = true ...@@ -26,6 +26,7 @@ skia_support_skottie = true
declare_args() { declare_args() {
enable_skia_wuffs_gif = false enable_skia_wuffs_gif = false
skia_whitelist_serialized_typefaces = false skia_whitelist_serialized_typefaces = false
skia_use_dawn = false
} }
# External-facing config for dependent code. # External-facing config for dependent code.
...@@ -64,6 +65,9 @@ config("skia_config") { ...@@ -64,6 +65,9 @@ config("skia_config") {
"SK_VULKAN=1", "SK_VULKAN=1",
] ]
} }
if (skia_use_dawn) {
defines += [ "SK_DAWN" ]
}
if (is_component_build) { if (is_component_build) {
defines += [ "SKIA_DLL" ] defines += [ "SKIA_DLL" ]
...@@ -488,6 +492,13 @@ component("skia") { ...@@ -488,6 +492,13 @@ component("skia") {
public_deps = [ public_deps = [
":skia_core_and_effects", ":skia_core_and_effects",
] ]
if (skia_use_dawn) {
public_deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
deps += [
"//third_party/dawn:libdawn_native",
"//third_party/dawn/src/dawn:libdawn",
]
}
if (!is_ios) { if (!is_ios) {
deps += [ deps += [
...@@ -528,7 +539,9 @@ component("skia") { ...@@ -528,7 +539,9 @@ component("skia") {
"Foundation.framework", "Foundation.framework",
] ]
} }
if (skia_use_dawn) {
sources += skia_dawn_sources
}
if (is_ios) { if (is_ios) {
libs = [ "ImageIO.framework" ] libs = [ "ImageIO.framework" ]
set_sources_assignment_filter([]) set_sources_assignment_filter([])
...@@ -621,6 +634,9 @@ skia_source_set("skia_core_and_effects") { ...@@ -621,6 +634,9 @@ skia_source_set("skia_core_and_effects") {
"//gpu/config:workaround_list", "//gpu/config:workaround_list",
] ]
} }
if (skia_use_dawn) {
deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
}
visibility = [ ":skia" ] visibility = [ ":skia" ]
} }
...@@ -768,6 +784,9 @@ if (is_mac) { ...@@ -768,6 +784,9 @@ if (is_mac) {
deps = [ deps = [
"//gpu/config:workaround_list", "//gpu/config:workaround_list",
] ]
if (skia_use_dawn) {
deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment