[PATCH 2/3] glamor: Remove redundant reference to screen pixmap EGL image
Zhigang Gong
zhigang.gong at linux.intel.com
Tue Dec 9 01:23:12 PST 2014
Right, since the egl image has been moved to the normal pixmap_priv
structure, we no longer need to do this type of redundant things.
The patch LGTM, thanks.
Revewied-by: Zhigang Gong <zhigang.gong at linux.intel.com>
Thanks,
Zhigang Gong.
On Mon, Dec 08, 2014 at 01:38:44PM -0800, Keith Packard wrote:
> 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 at keithp.com>
> ---
> glamor/glamor_egl.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
> index 904becf..d93aee4 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;
>
> --
> 2.1.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list