diff options
author | Keith Packard <keithp@keithp.com> | 2014-12-05 11:02:11 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-12-09 08:48:28 -0800 |
commit | c22433d55ea16e4879b092ee28d284fc895c9956 (patch) | |
tree | f2c8c99146045733cc17e91cc6d2e2e14d0064e7 /glamor/glamor_egl.c | |
parent | 5064ffab631dcbc4265079fb32a02d3e2f1c4cd8 (diff) |
glamor: Remove redundant reference to screen pixmap EGL image
There's no reason to store this in the egl screen private as the
screen pixmap will always hold a reference to it anyways.
Signed-off-by: Keith Packard <keithp@keithp.com>
Revewied-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_egl.c')
-rw-r--r-- | glamor/glamor_egl.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 8b656fe38..e90782e30 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -69,7 +69,6 @@ struct glamor_egl_screen_private { CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; int fd; - EGLImageKHR front_image; int cpp; #ifdef GLAMOR_HAS_GBM struct gbm_device *gbm; @@ -219,13 +218,9 @@ Bool glamor_egl_create_textured_screen(ScreenPtr screen, int handle, int stride) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - struct glamor_pixmap_private *pixmap_priv; - struct glamor_egl_screen_private *glamor_egl; PixmapPtr screen_pixmap; - glamor_egl = glamor_egl_get_screen_private(scrn); screen_pixmap = screen->GetScreenPixmap(screen); - pixmap_priv = glamor_get_pixmap_private(screen_pixmap); if (!glamor_egl_create_textured_pixmap(screen_pixmap, handle, stride)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, @@ -233,7 +228,6 @@ glamor_egl_create_textured_screen(ScreenPtr screen, int handle, int stride) return FALSE; } - glamor_egl->front_image = pixmap_priv->base.image; glamor_set_screen_pixmap(screen_pixmap, NULL); return TRUE; } @@ -533,9 +527,6 @@ glamor_egl_destroy_pixmap_image(PixmapPtr pixmap) _X_EXPORT void glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back) { - ScrnInfoPtr scrn = xf86ScreenToScrn(front->drawable.pScreen); - struct glamor_egl_screen_private *glamor_egl = - glamor_egl_get_screen_private(scrn); EGLImageKHR temp; struct glamor_pixmap_private *front_priv = glamor_get_pixmap_private(front); @@ -550,7 +541,6 @@ glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back) glamor_set_pixmap_type(front, GLAMOR_TEXTURE_DRM); glamor_set_pixmap_type(back, GLAMOR_TEXTURE_DRM); - glamor_egl->front_image = front_priv->base.image; } @@ -567,9 +557,8 @@ glamor_egl_close_screen(ScreenPtr screen) screen_pixmap = screen->GetScreenPixmap(screen); pixmap_priv = glamor_get_pixmap_private(screen_pixmap); - eglDestroyImageKHR(glamor_egl->display, glamor_egl->front_image); + eglDestroyImageKHR(glamor_egl->display, pixmap_priv->base.image); pixmap_priv->base.image = NULL; - glamor_egl->front_image = NULL; screen->CloseScreen = glamor_egl->saved_close_screen; |