From patchwork Fri Jan 15 20:56:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 73219 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0FKtnch023885 for ; Fri, 15 Jan 2010 20:55:50 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9BE759EB32; Fri, 15 Jan 2010 12:55:48 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id F024C9E95F; Fri, 15 Jan 2010 12:55:46 -0800 (PST) Received: from pollan.anholt.net (annarchy.freedesktop.org [127.0.0.1]) by annarchy.freedesktop.org (Postfix) with ESMTP id B61D8130147; Fri, 15 Jan 2010 12:55:46 -0800 (PST) Received: by pollan.anholt.net (Postfix, from userid 1000) id 5CB1032C066; Fri, 15 Jan 2010 12:56:09 -0800 (PST) From: Eric Anholt To: intel-gfx@lists.freedesktop.org Date: Fri, 15 Jan 2010 12:56:06 -0800 Message-Id: <1263588966-3228-1-git-send-email-eric@anholt.net> X-Mailer: git-send-email 1.6.5.7 Subject: [Intel-gfx] [PATCH] intel: Use the compositing-aware colorkey filler instead of homebrew fail. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org diff --git a/src/i810_video.c b/src/i810_video.c index c82fcc9..ee1a232 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 964f1e0..d1f391b 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;