summaryrefslogtreecommitdiff
path: root/src/radeon_exa_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_exa_shared.c')
-rw-r--r--src/radeon_exa_shared.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c
index be1d2faf..28dc3358 100644
--- a/src/radeon_exa_shared.c
+++ b/src/radeon_exa_shared.c
@@ -126,6 +126,25 @@ Bool RADEONCheckBPP(int bpp)
return FALSE;
}
+PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid)
+{
+ PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0);
+ struct radeon_bo *bo;
+
+ exaMoveInPixmap(pPix);
+ bo = radeon_get_pixmap_bo(pPix);
+
+ if (radeon_bo_map(bo, 1)) {
+ pScreen->DestroyPixmap(pPix);
+ return NULL;
+ }
+
+ memcpy(bo->ptr, &solid, 4);
+ radeon_bo_unmap(bo);
+
+ return pPix;
+}
+
static Bool radeon_vb_get(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);