[PATCH v2 4/4] composite: Copy the window contents back from the pixmap
Daniel Stone
daniel at fooishbar.org
Mon Dec 27 06:40:14 PST 2010
Hi,
On Mon, Dec 27, 2010 at 03:24:13PM +0200, ville.syrjala at nokia.com wrote:
> +void
> +compRestoreWindow (WindowPtr pWin, PixmapPtr pPixmap)
> +{
> + ScreenPtr pScreen = pWin->drawable.pScreen;
> + WindowPtr pParent = pWin->parent;
> +
> + if (pParent->drawable.depth == pWin->drawable.depth) {
> + GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen);
> + int bw = (int) pWin->borderWidth;
> + int x = bw;
> + int y = bw;
> + int w = pWin->drawable.width;
> + int h = pWin->drawable.height;
> +
> + if (pGC) {
> + ChangeGCVal val;
> + val.val = IncludeInferiors;
> + ChangeGC (NullClient, pGC, GCSubwindowMode, &val);
> + ValidateGC(&pWin->drawable, pGC);
> + (*pGC->ops->CopyArea) (&pPixmap->drawable,
> + &pWin->drawable,
> + pGC,
> + x, y, w, h, 0, 0);
> + FreeScratchGC (pGC);
> + }
> + }
> +}
It might be nice to get the Render fallback path for non-matching depths
here; aside from that, for the entire series:
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101227/fb784255/attachment.pgp>
More information about the xorg-devel
mailing list