Skip to content

Commit 687d743

Browse files
sunnypsSkCQ
authored and
SkCQ
committed
graphite: Split backend include sources in build
Without splitting backend public includes from private sources, it's not possible to make gn check pass in Chromium when enabling Graphite by default. In Chromium, we want to allow Skia dependents like viz or gpu to depend on Graphite backend specific headers e.g. DawnTypes.h so we want to put those in the "public" sources for the skia component. Bug: b/279229242 Change-Id: I54697dedad1ee17187253f0fd1cb6d867769c3d5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/677136 Commit-Queue: Sunny Sachanandani <[email protected]> Reviewed-by: Kevin Lubick <[email protected]>
1 parent 87779f4 commit 687d743

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

BUILD.gn

+3
Original file line numberDiff line numberDiff line change
@@ -1288,10 +1288,12 @@ optional("graphite") {
12881288
}
12891289

12901290
if (skia_use_dawn) {
1291+
public += skia_graphite_dawn_public
12911292
sources += skia_graphite_dawn_sources
12921293
}
12931294
if (skia_use_metal) {
12941295
public_defines += [ "SK_METAL" ]
1296+
public += skia_graphite_mtl_public
12951297
sources += skia_graphite_mtl_sources
12961298
if (skia_enable_metal_debug_info) {
12971299
public_defines += [ "SK_ENABLE_MTL_DEBUG_INFO" ]
@@ -1303,6 +1305,7 @@ optional("graphite") {
13031305
}
13041306
}
13051307
if (skia_use_vulkan) {
1308+
public += skia_graphite_vk_public
13061309
sources += skia_graphite_vk_sources
13071310
}
13081311
if (skia_enable_precompile) {

gn/graphite.gni

+12-3
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,13 @@ skia_graphite_sources = [
193193
"$_src/text/AtlasManager.h",
194194
]
195195

196-
skia_graphite_dawn_sources = [
196+
skia_graphite_dawn_public = [
197197
"$_include/dawn/DawnBackendContext.h",
198198
"$_include/dawn/DawnTypes.h",
199199
"$_include/dawn/DawnUtils.h",
200+
]
201+
202+
skia_graphite_dawn_sources = [
200203
"$_include_private/DawnTypesPriv.h",
201204
"$_src/dawn/DawnAsyncWait.cpp",
202205
"$_src/dawn/DawnAsyncWait.h",
@@ -223,10 +226,13 @@ skia_graphite_dawn_sources = [
223226
"$_src/dawn/DawnTypesPriv.cpp",
224227
]
225228

226-
skia_graphite_mtl_sources = [
229+
skia_graphite_mtl_public = [
227230
"$_include/mtl/MtlBackendContext.h",
228231
"$_include/mtl/MtlGraphiteTypes.h",
229232
"$_include/mtl/MtlGraphiteUtils.h",
233+
]
234+
235+
skia_graphite_mtl_sources = [
230236
"$_include_private/MtlGraphiteTypesPriv.h",
231237
"$_src/mtl/MtlBlitCommandEncoder.h",
232238
"$_src/mtl/MtlBuffer.h",
@@ -256,9 +262,12 @@ skia_graphite_mtl_sources = [
256262
"$_src/mtl/MtlTexture.mm",
257263
]
258264

259-
skia_graphite_vk_sources = [
265+
skia_graphite_vk_public = [
260266
"$_include/vk/VulkanGraphiteTypes.h",
261267
"$_include/vk/VulkanGraphiteUtils.h",
268+
]
269+
270+
skia_graphite_vk_sources = [
262271
"$_include_private/VulkanGraphiteTypesPriv.h",
263272
"$_src/vk/VulkanBuffer.cpp",
264273
"$_src/vk/VulkanBuffer.h",

0 commit comments

Comments
 (0)