[cogl/cogl-1.20] pango: Conditionally use deprecated API
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-1.20] pango: Conditionally use deprecated API
- Date: Wed, 10 Jun 2015 14:34:25 +0000 (UTC)
commit 9ab320cd3d4b32ed5d30ff80310daca555a0989e
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Jun 10 15:14:30 2015 +0100
pango: Conditionally use deprecated API
When compiling against a newer version of Pango we can avoid the
deprecation warning.
cogl-pango/cogl-pango-fontmap.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/cogl-pango/cogl-pango-fontmap.c b/cogl-pango/cogl-pango-fontmap.c
index 7222238..a9c7df0 100644
--- a/cogl-pango/cogl-pango-fontmap.c
+++ b/cogl-pango/cogl-pango-fontmap.c
@@ -98,9 +98,13 @@ cogl_pango_font_map_create_context (CoglPangoFontMap *fm)
{
_COGL_RETURN_VAL_IF_FAIL (COGL_PANGO_IS_FONT_MAP (fm), NULL);
+#if PANGO_VERSION_CHECK (1, 22, 0)
/* We can just directly use the pango context from the Cairo font
map */
+ return pango_font_map_create_context (PANGO_FONT_MAP (fm));
+#else
return pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fm));
+#endif
}
static CoglPangoFontMapPriv *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]