Skip to content

Commit

Permalink
Add Skia's Dawn backend as a compile-time option in Chrome.
Browse files Browse the repository at this point in the history
Change-Id: I5c5b27bdf1923aa3d0b3a6fb2fb36d3ce1fcb733
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864361
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709071}
  • Loading branch information
SenorBlanco authored and Commit Bot committed Oct 24, 2019
1 parent 0890b95 commit 8fe9a74
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ skia_support_skottie = true
declare_args() {
enable_skia_wuffs_gif = false
skia_whitelist_serialized_typefaces = false
skia_use_dawn = false
}

# External-facing config for dependent code.
Expand Down Expand Up @@ -64,6 +65,9 @@ config("skia_config") {
"SK_VULKAN=1",
]
}
if (skia_use_dawn) {
defines += [ "SK_DAWN" ]
}

if (is_component_build) {
defines += [ "SKIA_DLL" ]
Expand Down Expand Up @@ -488,6 +492,13 @@ component("skia") {
public_deps = [
":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) {
deps += [
Expand Down Expand Up @@ -528,7 +539,9 @@ component("skia") {
"Foundation.framework",
]
}

if (skia_use_dawn) {
sources += skia_dawn_sources
}
if (is_ios) {
libs = [ "ImageIO.framework" ]
set_sources_assignment_filter([])
Expand Down Expand Up @@ -621,6 +634,9 @@ skia_source_set("skia_core_and_effects") {
"//gpu/config:workaround_list",
]
}
if (skia_use_dawn) {
deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
}

visibility = [ ":skia" ]
}
Expand Down Expand Up @@ -768,6 +784,9 @@ if (is_mac) {
deps = [
"//gpu/config:workaround_list",
]
if (skia_use_dawn) {
deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
}
}
}

Expand Down

0 comments on commit 8fe9a74

Please sign in to comment.