diff options
author | marha <marha@users.sourceforge.net> | 2014-03-21 19:36:05 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-21 19:36:05 +0100 |
commit | 41fea4472dec859ddec76bdfa7108ebec71de1e3 (patch) | |
tree | 385ccec6dc105acc75169122d4e0714046cfbbd5 /xorg-server/glamor/glamor.c | |
parent | cd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914 (diff) | |
download | vcxsrv-41fea4472dec859ddec76bdfa7108ebec71de1e3.tar.gz vcxsrv-41fea4472dec859ddec76bdfa7108ebec71de1e3.tar.bz2 vcxsrv-41fea4472dec859ddec76bdfa7108ebec71de1e3.zip |
xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014
xserver commit 4fb31e4824d46edc80bb49b4065152899faa5ac6
libxcb commit cb686b576739deea00180c54697c8b62b8419ae0
libX11 commit 8be4610939b833587954957f5963eb4191b43d19
libXext commit 11aad96bd689d54156064d2e81213dc827a689d1
fontconfig commit 5478192f379d784b421329e4bf72cc780818e467
mesa commit 8d8d0cb09eb8735a04fc36cc4d0e2dc9f9d460eb
Diffstat (limited to 'xorg-server/glamor/glamor.c')
-rw-r--r-- | xorg-server/glamor/glamor.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/xorg-server/glamor/glamor.c b/xorg-server/glamor/glamor.c index e85617927..0f7d68b70 100644 --- a/xorg-server/glamor/glamor.c +++ b/xorg-server/glamor/glamor.c @@ -271,6 +271,29 @@ glamor_set_debug_level(int *debug_level) int glamor_debug_level; +/** + * Creates any pixmaps used internally by glamor, since those can't be + * allocated at ScreenInit time. + */ +static Bool +glamor_create_screen_resources(ScreenPtr screen) +{ + glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); + Bool ret = TRUE; + + screen->CreateScreenResources = + glamor_priv->saved_procs.create_screen_resources; + if (screen->CreateScreenResources) + ret = screen->CreateScreenResources(screen); + screen->CreateScreenResources = glamor_create_screen_resources; + + if (!glamor_realize_glyph_caches(screen)) { + ErrorF("Failed to initialize glyph cache\n"); + ret = FALSE; + } + + return ret; +} /** Set up glamor for an already-configured GL context. */ Bool @@ -290,6 +313,7 @@ glamor_init(ScreenPtr screen, unsigned int flags) if (glamor_priv == NULL) return FALSE; + glamor_priv->flags = flags; if (flags & GLAMOR_INVERTED_Y_AXIS) { glamor_priv->yInverted = TRUE; } @@ -349,6 +373,7 @@ glamor_init(ScreenPtr screen, unsigned int flags) } } + glamor_priv->has_khr_debug = glamor_gl_has_extension("GL_KHR_debug"); glamor_priv->has_pack_invert = glamor_gl_has_extension("GL_MESA_pack_invert"); glamor_priv->has_fbo_blit = @@ -374,6 +399,10 @@ glamor_init(ScreenPtr screen, unsigned int flags) glamor_priv->saved_procs.close_screen = screen->CloseScreen; screen->CloseScreen = glamor_close_screen; + glamor_priv->saved_procs.create_screen_resources = + screen->CreateScreenResources; + screen->CreateScreenResources = glamor_create_screen_resources; + if (flags & GLAMOR_USE_SCREEN) { if (!RegisterBlockAndWakeupHandlers(_glamor_block_handler, _glamor_wakeup_handler, @@ -457,8 +486,8 @@ glamor_init(ScreenPtr screen, unsigned int flags) glamor_init_xv_shader(screen); #endif glamor_pixmap_init(screen); + glamor_glyphs_init(screen); - glamor_priv->flags = flags; glamor_priv->screen = screen; return TRUE; @@ -535,6 +564,8 @@ glamor_close_screen(ScreenPtr screen) flags = glamor_priv->flags; glamor_glyphs_fini(screen); screen->CloseScreen = glamor_priv->saved_procs.close_screen; + screen->CreateScreenResources = + glamor_priv->saved_procs.create_screen_resources; if (flags & GLAMOR_USE_SCREEN) { screen->CreateGC = glamor_priv->saved_procs.create_gc; @@ -617,7 +648,7 @@ glamor_fd_from_pixmap(ScreenPtr screen, } int -glamor_name_from_pixmap(PixmapPtr pixmap) +glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { glamor_pixmap_private *pixmap_priv; glamor_screen_private *glamor_priv = @@ -633,7 +664,7 @@ glamor_name_from_pixmap(PixmapPtr pixmap) return glamor_egl_dri3_fd_name_from_tex(pixmap->drawable.pScreen, pixmap, pixmap_priv->base.fbo->tex, - TRUE, NULL, NULL); + TRUE, stride, size); default: break; } |