Commit e86c3466 authored by Keith Packard's avatar Keith Packard

Clear shadow pixmaps before using them.

This eliminates some ugly flashing, as well as clearing the borders when the
shadow will not be completely painted.
parent 97ab0c6e
......@@ -153,6 +153,35 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc)
REGION_UNINIT (pScreen, &damage_region);
}
static void
xf86CrtcShadowClear (xf86CrtcPtr crtc)
{
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
ScrnInfoPtr scrn = crtc->scrn;
ScreenPtr screen = scrn->pScreen;
PicturePtr dst;
PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
static xRenderColor black = { 0, 0, 0, 0 };
xRectangle rect;
int error;
dst = CreatePicture (None,
&dst_pixmap->drawable,
format,
0L,
NULL,
serverClient,
&error);
if (!dst)
return;
rect.x = 0;
rect.y = 0;
rect.width = dst_pixmap->drawable.width;
rect.height = dst_pixmap->drawable.height;
CompositeRects (PictOpSrc, dst, &black, 1, &rect);
FreePicture (dst, None);
}
static void
xf86RotatePrepare (ScreenPtr pScreen)
{
......@@ -170,6 +199,7 @@ xf86RotatePrepare (ScreenPtr pScreen)
crtc->rotatedData,
crtc->mode.HDisplay,
crtc->mode.VDisplay);
xf86CrtcShadowClear (crtc);
if (!xf86_config->rotation_damage_registered)
{
/* Hook damage to screen pixmap */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment