summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-01-15 12:53:47 -0800
committerEric Anholt <eric@anholt.net>2010-01-17 12:36:13 -0800
commit93cd943d41c646c794b8cb5a960d8f0805e15395 (patch)
tree3a996c06ff41550bdf4be97d5f2c3f8397b9bbfd
parent6e61de896b42cffe1af6b0384cb69265d3d121a1 (diff)
intel: Use the compositing-aware colorkey filler instead of homebrew fail.
Of course, it's still fail since you can't correctly composite colorkey overlay, but at least this doesn't spam colorkey to the root window. Tested-by: Daniel Vetter <daniel@ffwll.ch>
-rw-r--r--src/i810_video.c2
-rw-r--r--src/i830_video.c39
2 files changed, 4 insertions, 37 deletions
diff --git a/src/i810_video.c b/src/i810_video.c
index c82fcc92..ee1a2326 100644
--- a/src/i810_video.c
+++ b/src/i810_video.c
@@ -1085,7 +1085,7 @@ I810PutImage(
if(!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) {
REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
/* draw these */
- xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
+ xf86XVFillKeyHelperDrawable(pDraw, pPriv->colorKey, clipBoxes);
}
I810DisplayVideo(pScrn, id, width, height, dstPitch,
diff --git a/src/i830_video.c b/src/i830_video.c
index 964f1e09..d1f391b6 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1282,40 +1282,6 @@ i830_clip_video_helper(ScrnInfoPtr scrn,
}
static void
-i830_fill_colorkey(ScreenPtr screen, uint32_t key, RegionPtr clipboxes)
-{
- DrawablePtr root = &WindowTable[screen->myNum]->drawable;
- XID pval[2];
- BoxPtr pbox = REGION_RECTS(clipboxes);
- int i, nbox = REGION_NUM_RECTS(clipboxes);
- xRectangle *rects;
- GCPtr gc;
-
- if (!xf86Screens[screen->myNum]->vtSema)
- return;
-
- gc = GetScratchGC(root->depth, screen);
- pval[0] = key;
- pval[1] = IncludeInferiors;
- (void)ChangeGC(gc, GCForeground | GCSubwindowMode, pval);
- ValidateGC(root, gc);
-
- rects = xalloc(nbox * sizeof(xRectangle));
-
- for (i = 0; i < nbox; i++, pbox++) {
- rects[i].x = pbox->x1;
- rects[i].y = pbox->y1;
- rects[i].width = pbox->x2 - pbox->x1;
- rects[i].height = pbox->y2 - pbox->y1;
- }
-
- (*gc->ops->PolyFillRect) (root, gc, nbox, rects);
-
- xfree(rects);
- FreeScratchGC(gc);
-}
-
-static void
i830_wait_for_scanline(ScrnInfoPtr scrn, PixmapPtr pixmap,
xf86CrtcPtr crtc, RegionPtr clipBoxes)
{
@@ -1599,7 +1565,6 @@ I830PutImageOverlay(ScrnInfoPtr scrn,
DrawablePtr drawable)
{
intel_adaptor_private *adaptor_priv = (intel_adaptor_private *) data;
- ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
int dstPitch;
int dstPitch2 = 0;
BoxRec dstBox;
@@ -1654,7 +1619,9 @@ I830PutImageOverlay(ScrnInfoPtr scrn,
/* update cliplist */
if (!REGION_EQUAL(scrn->pScreen, &adaptor_priv->clip, clipBoxes)) {
REGION_COPY(scrn->pScreen, &adaptor_priv->clip, clipBoxes);
- i830_fill_colorkey(screen, adaptor_priv->colorKey, clipBoxes);
+ xf86XVFillKeyHelperDrawable(drawable,
+ adaptor_priv->colorKey,
+ clipBoxes);
}
adaptor_priv->videoStatus = CLIENT_VIDEO_ON;