summaryrefslogtreecommitdiff
path: root/src/libs/txt/Makefile.am
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-11-16 19:37:22 -0800
committerVito Caputo <vcaputo@pengaru.com>2019-11-16 19:37:22 -0800
commita6f43bc59fc1292060081d5a4837f5679e1b186f (patch)
tree20e87bf064a67473a81bedc64a1ef6bd4667ee21 /src/libs/txt/Makefile.am
parent7bbb0fa20ff65a05031886c35646248dc94a38a8 (diff)
libs/txt: add minimal ascii text renderer
This is as basic as it gets, the only fanciness is it recognizes newlines and supports horizontal and vertical justification. As this is intended to be run from potentially threaded fragmenter renderers, it receives a fragment and *frame* coordinates for the text to be rendered. If the text doesn't land in the given fragment, nothing gets drawn. Currently this is not optimized at all. There's a stubbed out rect overlap test function which could be used to avoid entering the text rendering loop for fragments with zero overlap, that's an obvious low-hanging fruit optimization. After that, skipping characters that don't overlap would be another obvious thing. As-is the text render loop is always entered and the bounds-checked put pixel helper is used. So every fragment will incur the cost of rendering the full string, even when it's not visible. For the rtv captions this isn't a particularly huge deal, but stuff to improve upon in the future.
Diffstat (limited to 'src/libs/txt/Makefile.am')
-rw-r--r--src/libs/txt/Makefile.am3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/txt/Makefile.am b/src/libs/txt/Makefile.am
new file mode 100644
index 0000000..88aa79b
--- /dev/null
+++ b/src/libs/txt/Makefile.am
@@ -0,0 +1,3 @@
+noinst_LIBRARIES = libtxt.a
+libtxt_a_SOURCES = txt.c txt.h
+libtxt_a_CPPFLAGS = -I@top_srcdir@/src -I@top_srcdir@/src/libs
© All Rights Reserved