mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
bb156970de
When rendering a pango layout CoglPangoRenderer now records the operations into a list called a CoglPangoDisplayList. The entries in the list are either glyph renderings from a texture, rectangles or trapezoids. Multiple consecutive glyph renderings from the same glyph cache texture are combined into a single entry. Note the CoglPangoDisplayList has nothing to do with a GL display list. After the display list is built it is attached to the PangoLayout with g_object_set_qdata so that next time the layout is rendered it can bypass rebuilding it. The glyph rendering entries are drawn via a VBO. The VBO is attached to the display list so it can be used multiple times. This makes the common case of rendering a PangoLayout contained in a single texture subsequent times usually boil down to a single call to glDrawArrays with an already uploaded VBO. The VBOs are accessed via the cogl_vertex_buffer API so if VBOs are not available in GL it will resort to a fallback. Note this will fall apart if the pango layout is altered after the first render. I can't find a way to detect when the layout is altered. However this won't affect ClutterText because it creates a new PangoLayout whenever any properties are changed.
34 lines
834 B
Makefile
34 lines
834 B
Makefile
source_c = \
|
|
cogl-pango-display-list.c \
|
|
cogl-pango-fontmap.c \
|
|
cogl-pango-render.c \
|
|
cogl-pango-glyph-cache.c
|
|
|
|
source_h = cogl-pango.h
|
|
|
|
source_h_priv = \
|
|
cogl-pango-display-list.h \
|
|
cogl-pango-private.h \
|
|
cogl-pango-glyph-cache.h
|
|
|
|
noinst_LTLIBRARIES = libcoglpango.la
|
|
|
|
libcoglpango_la_SOURCES = \
|
|
$(source_c) \
|
|
$(source_h) \
|
|
$(source_h_priv)
|
|
|
|
INCLUDES = \
|
|
@GCC_FLAGS@ @CLUTTER_CFLAGS@ \
|
|
$(CLUTTER_DEBUG_CFLAGS) \
|
|
$(MAINTAINER_CFLAGS) \
|
|
-DCLUTTER_COMPILATION \
|
|
-I$(top_srcdir) \
|
|
-I$(top_srcdir)/clutter \
|
|
-I$(top_srcdir)/clutter/cogl \
|
|
-I$(top_builddir)/clutter \
|
|
-I$(top_builddir)/clutter/cogl
|
|
|
|
coglpangoheadersdir = $(includedir)/clutter-@CLUTTER_MAJORMINOR@/cogl
|
|
coglpangoheaders_HEADERS = $(source_h)
|