Wrong patch title. :-) Regards //Ernst
2016-02-16 9:29 GMT+01:00 Michel Dänzer <[email protected]>: > From: jimqu <[email protected]> > > The next commit will call the former from the latter. No functional > change. > > Signed-off-by: JimQu <[email protected]> > (ported from amdgpu commit 5269a2228bff6023c1a7f3e8534027e1d7addc25) > > Signed-off-by: Michel Dänzer <[email protected]> > --- > src/radeon_glamor.c | 70 > ++++++++++++++++++++++++++--------------------------- > 1 file changed, 35 insertions(+), 35 deletions(-) > > diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c > index 86db4e2..6a12b33 100644 > --- a/src/radeon_glamor.c > +++ b/src/radeon_glamor.c > @@ -159,6 +159,41 @@ radeon_glamor_create_textured_pixmap(PixmapPtr pixmap, > struct radeon_pixmap *pri > pixmap->devKind); > } > > +static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap) > +{ > +#ifndef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP > + ScreenPtr screen = pixmap->drawable.pScreen; > + RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(screen)); > + Bool ret; > +#endif > + > + if (pixmap->refcnt == 1) { > + if (pixmap->devPrivate.ptr) { > + struct radeon_bo *bo = radeon_get_pixmap_bo(pixmap); > + > + if (bo) > + radeon_bo_unmap(bo); > + } > + > +#ifdef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP > + glamor_egl_destroy_textured_pixmap(pixmap); > +#endif > + radeon_set_pixmap_bo(pixmap, NULL); > + } > + > +#ifdef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP > + fbDestroyPixmap(pixmap); > + return TRUE; > +#else > + screen->DestroyPixmap = info->glamor.SavedDestroyPixmap; > + ret = screen->DestroyPixmap(pixmap); > + info->glamor.SavedDestroyPixmap = screen->DestroyPixmap; > + screen->DestroyPixmap = radeon_glamor_destroy_pixmap; > + > + return ret; > +#endif > +} > + > static PixmapPtr > radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, > unsigned usage) > @@ -250,41 +285,6 @@ fallback_pixmap: > return fbCreatePixmap(screen, w, h, depth, usage); > } > > -static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap) > -{ > -#ifndef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP > - ScreenPtr screen = pixmap->drawable.pScreen; > - RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(screen)); > - Bool ret; > -#endif > - > - if (pixmap->refcnt == 1) { > - if (pixmap->devPrivate.ptr) { > - struct radeon_bo *bo = radeon_get_pixmap_bo(pixmap); > - > - if (bo) > - radeon_bo_unmap(bo); > - } > - > -#ifdef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP > - glamor_egl_destroy_textured_pixmap(pixmap); > -#endif > - radeon_set_pixmap_bo(pixmap, NULL); > - } > - > -#ifdef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP > - fbDestroyPixmap(pixmap); > - return TRUE; > -#else > - screen->DestroyPixmap = info->glamor.SavedDestroyPixmap; > - ret = screen->DestroyPixmap(pixmap); > - info->glamor.SavedDestroyPixmap = screen->DestroyPixmap; > - screen->DestroyPixmap = radeon_glamor_destroy_pixmap; > - > - return ret; > -#endif > -} > - > #ifdef RADEON_PIXMAP_SHARING > > static Bool > -- > 2.7.0 > > _______________________________________________ > xorg-driver-ati mailing list > [email protected] > https://lists.x.org/mailman/listinfo/xorg-driver-ati _______________________________________________ xorg-driver-ati mailing list [email protected] https://lists.x.org/mailman/listinfo/xorg-driver-ati
