modesetting: Use glamor_clear_pixmap in drmmode_clear_pixmap
Should be slightly more efficient. Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
9ba13bac9d
commit
60003023fa
|
@ -748,6 +748,7 @@ bind_glamor_api(void *mod, modesettingPtr ms)
|
|||
{
|
||||
ms->glamor.back_pixmap_from_fd = LoaderSymbolFromModule(mod, "glamor_back_pixmap_from_fd");
|
||||
ms->glamor.block_handler = LoaderSymbolFromModule(mod, "glamor_block_handler");
|
||||
ms->glamor.clear_pixmap = LoaderSymbolFromModule(mod, "glamor_clear_pixmap");
|
||||
ms->glamor.egl_create_textured_pixmap = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap");
|
||||
ms->glamor.egl_create_textured_pixmap_from_gbm_bo = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap_from_gbm_bo");
|
||||
ms->glamor.egl_exchange_buffers = LoaderSymbolFromModule(mod, "glamor_egl_exchange_buffers");
|
||||
|
|
|
@ -137,6 +137,7 @@ typedef struct _modesettingRec {
|
|||
Bool (*back_pixmap_from_fd)(PixmapPtr, int, CARD16, CARD16, CARD16,
|
||||
CARD8, CARD8);
|
||||
void (*block_handler)(ScreenPtr);
|
||||
void (*clear_pixmap)(PixmapPtr);
|
||||
Bool (*egl_create_textured_pixmap)(PixmapPtr, int, int);
|
||||
Bool (*egl_create_textured_pixmap_from_gbm_bo)(PixmapPtr,
|
||||
struct gbm_bo *,
|
||||
|
|
|
@ -1804,6 +1804,14 @@ drmmode_clear_pixmap(PixmapPtr pixmap)
|
|||
{
|
||||
ScreenPtr screen = pixmap->drawable.pScreen;
|
||||
GCPtr gc;
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
|
||||
|
||||
if (ms->drmmode.glamor) {
|
||||
ms->glamor.clear_pixmap(pixmap);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
gc = GetScratchGC(pixmap->drawable.depth, screen);
|
||||
if (gc) {
|
||||
|
|
Loading…
Reference in New Issue