diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-03-07 13:58:48 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-03-07 13:58:48 +1100 |
commit | f28abbedfc7deeb90317dd24c7ec5dfe1ae94fdf (patch) | |
tree | 9c8789a3cb89e580d7a75c3a636de0e739f83c70 | |
parent | 6441253d34d118befe8950781ba012fc58bb5158 (diff) | |
download | xorg-driver-xf86-video-nouveau-f28abbedfc7deeb90317dd24c7ec5dfe1ae94fdf.tar.gz |
Only use Y32 for Solid().
It's the only place the workaround is needed at this point, and in some places
we need to use the "proper" ARGB format (Xv for instance).
-rw-r--r-- | src/nv_accel_common.c | 3 | ||||
-rw-r--r-- | src/nv_exa.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c index 6e201b8..3fc4332 100644 --- a/src/nv_accel_common.c +++ b/src/nv_accel_common.c @@ -118,8 +118,7 @@ NVAccelGetCtxSurf2DFormatFromPixmap(PixmapPtr pPix, int *fmt_ret) { switch (pPix->drawable.bitsPerPixel) { case 32: - //*fmt_ret = SURFACE_FORMAT_A8R8G8B8; - *fmt_ret = 0xb; // SURFACE_FORMAT_Y32 + *fmt_ret = SURFACE_FORMAT_A8R8G8B8; break; case 24: *fmt_ret = SURFACE_FORMAT_X8R8G8B8; diff --git a/src/nv_exa.c b/src/nv_exa.c index bc05a74..ed6901b 100644 --- a/src/nv_exa.c +++ b/src/nv_exa.c @@ -104,6 +104,14 @@ static Bool NVExaPrepareSolid(PixmapPtr pPixmap, if (!NVAccelGetCtxSurf2DFormatFromPixmap(pPixmap, &fmt)) return FALSE; + + /* When SURFACE_FORMAT_A8R8G8B8 is used with GDI_RECTANGLE_TEXT, the + * alpha channel gets forced to 0xFF for some reason. We're using + * SURFACE_FORMAT_Y32 as a workaround + */ + if (fmt == SURFACE_FORMAT_A8R8G8B8) + fmt = 0xb; + if (!NVAccelSetCtxSurf2D(pNv, pPixmap, pPixmap, fmt)) return FALSE; |