text: font: add owner field to font_ops
authorDavid Herrmann <dh.herrmann@googlemail.com>
Thu, 3 Jan 2013 15:23:52 +0000 (16:23 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Thu, 3 Jan 2013 15:23:52 +0000 (16:23 +0100)
commit5dcdc91b42261c085d1aa01aca58a4352cbd0fbd
tree2be0efb438356dbcc172ed77d48bf9ae576b1de9
parenta8c1d8bbf1f1843ce3351c50979d2065aaa56e32
text: font: add owner field to font_ops

The owner fields specifies the module that provides the code for the given
backend. The font-core is responsible of ref/unref'ing the module so its
code is always available as long as the module exists.

We cannot push this into the modules as modules _must_ never call
kmscon_module_unref(KMSCON_THIS_MODULE)! Because this might drop the last
reference and hence the function might disallocate the module. However,
this means that it cannot return because the caller is _part_ of the
module and so no longer valid.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/text.h
src/text_font.c
src/text_font_8x16.c
src/text_font_freetype2.c
src/text_font_pango.c
src/text_font_unifont.c