summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2014-12-11 16:50:40 +0900
committerKeith Packard <keithp@keithp.com>2014-12-11 19:36:47 -0800
commit0f5fdaf600bfeada966aea942cb3e347d4efee30 (patch)
tree4bdbf88a9203964a5882f33ebe675637399ba012 /glamor
parentc8d4c0a25dba49d1486761438b96374672b29645 (diff)
glamor: Make sure glamor_egl_close_screen wraps glamor_close_screen
The other way around fails to destroy the screen pixmap EGL image: ==1782== 80 (32 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 981 of 2,171 ==1782== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==1782== by 0xF9D4BD2: dri2_create_image_from_dri (egl_dri2.c:1264) ==1782== by 0xF9D4BD2: dri2_create_image_dma_buf (egl_dri2.c:1764) ==1782== by 0xF9D4BD2: dri2_create_image_khr (egl_dri2.c:1798) ==1782== by 0xF9C7937: eglCreateImageKHR (eglapi.c:1494) ==1782== by 0x85D5655: _glamor_egl_create_image (glamor_egl.c:134) ==1782== by 0x85D5655: glamor_egl_create_textured_pixmap (glamor_egl.c:302) ==1782== by 0x85D579B: glamor_egl_create_textured_screen (glamor_egl.c:225) ==1782== by 0xC1BE05D: radeon_glamor_create_screen_resources (radeon_glamor.c:67) ==1782== by 0xC1B6153: RADEONCreateScreenResources_KMS (radeon_kms.c:258) ==1782== by 0x4B2105: xf86CrtcCreateScreenResources (xf86Crtc.c:709) ==1782== by 0x43C823: dix_main (main.c:223) ==1782== by 0x6CFAB44: (below main) (libc-start.c:287) Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index d1aa1cfb0..e6e8647d5 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -424,6 +424,9 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_set_debug_level(&glamor_debug_level);
+ glamor_priv->saved_procs.close_screen = screen->CloseScreen;
+ screen->CloseScreen = glamor_close_screen;
+
/* If we are using egl screen, call egl screen init to
* register correct close screen function. */
if (flags & GLAMOR_USE_EGL_SCREEN) {
@@ -433,9 +436,6 @@ glamor_init(ScreenPtr screen, unsigned int flags)
goto fail;
}
- 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;