Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""
This reverts commit 9c2202ffc22b4293b48a4edeafa1b5d2bab8bb83.
Bug: skia:
Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd
Reviewed-on: https://skia-review.googlesource.com/73345
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 6e24d3d..73a9c91 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -52,6 +52,7 @@
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 @@
"include/encode",
"include/gpu",
"include/gpu/gl",
+ "include/atlastext",
"include/pathops",
"include/ports",
"include/svg",
@@ -102,6 +104,9 @@
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 @@
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 @@
libs += [ "Metal.framework" ]
cflags_objcc += [ "-fobjc-arc" ]
}
+
+ if (skia_enable_atlas_text) {
+ sources += skia_atlas_text_sources
+ }
}
optional("heif") {
@@ -992,6 +1004,7 @@
"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",