diff options
author | marha <marha@users.sourceforge.net> | 2014-03-21 22:50:26 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-21 22:56:24 +0100 |
commit | eb71c0f23999d1cc156e1821d73634ec79621fc2 (patch) | |
tree | d45d551ada10b1bfb3d57517c892770734a77817 /xorg-server/glamor/glamor_glyphs.c | |
parent | ab3d257d88f67e169a314ad0fac851fc2fc6cb05 (diff) | |
parent | 41fea4472dec859ddec76bdfa7108ebec71de1e3 (diff) | |
download | vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.gz vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.bz2 vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014
Conflicts:
libxcb/src/xcb_auth.c
libxcb/src/xcb_conn.c
libxcb/src/xcb_util.c
libxcb/src/xcb_windefs.h
mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'xorg-server/glamor/glamor_glyphs.c')
-rw-r--r-- | xorg-server/glamor/glamor_glyphs.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/xorg-server/glamor/glamor_glyphs.c b/xorg-server/glamor/glamor_glyphs.c index caafa4348..2b2c735d4 100644 --- a/xorg-server/glamor/glamor_glyphs.c +++ b/xorg-server/glamor/glamor_glyphs.c @@ -303,7 +303,7 @@ glamor_glyphs_fini(ScreenPtr pScreen) * rest of the allocated structures for all caches with the given format. */ -static Bool +Bool glamor_realize_glyph_caches(ScreenPtr pScreen) { glamor_screen_private *glamor = glamor_get_screen_private(pScreen); @@ -314,10 +314,6 @@ glamor_realize_glyph_caches(ScreenPtr pScreen) }; int i; - if (glamor->glyph_cache_initialized) - return TRUE; - - glamor->glyph_cache_initialized = TRUE; memset(glamor->glyphCaches, 0, sizeof(glamor->glyphCaches)); for (i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { @@ -370,16 +366,27 @@ glamor_realize_glyph_caches(ScreenPtr pScreen) return FALSE; } +/** + * Called by glamor_create_screen_resources() to set up the glyph cache. + * + * This was previously required to be called by the drivers, but not + * as of the xserver 1.16 ABI. + */ Bool glamor_glyphs_init(ScreenPtr pScreen) { + glamor_screen_private *glamor = glamor_get_screen_private(pScreen); + + if (glamor->glyph_cache_initialized) + return TRUE; + if (!dixRegisterPrivateKey(&glamor_glyph_key, PRIVATE_GLYPH, sizeof(struct glamor_glyph))) return FALSE; - /* Skip pixmap creation if we don't intend to use it. */ + glamor->glyph_cache_initialized = TRUE; - return glamor_realize_glyph_caches(pScreen); + return TRUE; } /* The most efficient thing to way to upload the glyph to the screen |