aboutsummaryrefslogtreecommitdiffhomepage
path: root/BUILD.gn
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-11-17 14:18:12 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-17 20:35:06 +0000
commit39631f3df172feb385527a5d125bc53b0bded7e6 (patch)
treef63361075ecc24f709d379c976b080d4d54949aa /BUILD.gn
parente686cc4efadec7606b3df0f1e4133011d68b10b3 (diff)
Add Atlas Text interface for rendering SDF glyphs.
This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The client issues text draws to potentially multiple targets and then the client flushes. The client then gets commands from Skia with data to put into a texture atlas and vertices to draw that reference the texture. The client is responsible for creating the texture, uploading the SDF data to the texture, and drawing the vertices provided by Skia. Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 Reviewed-on: https://skia-review.googlesource.com/59360 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn13
1 files changed, 13 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 6e24d3dec0..73a9c91565 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -52,6 +52,7 @@ declare_args() {
declare_args() {
skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib
skia_use_sfntly = skia_use_icu
+ skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu
if (is_android) {
skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
@@ -92,6 +93,7 @@ skia_public_includes = [
"include/encode",
"include/gpu",
"include/gpu/gl",
+ "include/atlastext",
"include/pathops",
"include/ports",
"include/svg",
@@ -102,6 +104,9 @@ skia_public_includes = [
if (skia_use_vulkan) {
skia_public_includes += [ "include/gpu/vk" ]
}
+if (skia_enable_atlas_text) {
+ skia_public_includes += [ "include/atlastext" ]
+}
if (skia_use_metal) {
skia_public_includes += [ "include/gpu/mtl" ]
}
@@ -125,6 +130,9 @@ config("skia_public") {
if (!skia_enable_gpu) {
defines += [ "SK_SUPPORT_GPU=0" ]
}
+ if (skia_enable_atlas_text) {
+ defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ]
+ }
}
# Skia internal APIs, used by Skia itself and a few test tools.
@@ -586,6 +594,10 @@ optional("gpu") {
libs += [ "Metal.framework" ]
cflags_objcc += [ "-fobjc-arc" ]
}
+
+ if (skia_enable_atlas_text) {
+ sources += skia_atlas_text_sources
+ }
}
optional("heif") {
@@ -992,6 +1004,7 @@ if (skia_enable_tools) {
"tools/gpu/GrContextFactory.cpp",
"tools/gpu/GrTest.cpp",
"tools/gpu/TestContext.cpp",
+ "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp",
"tools/gpu/gl/GLTestContext.cpp",
"tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
"tools/gpu/gl/debug/DebugGLTestContext.cpp",