45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright © 2000 Keith Packard
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission to use, copy, modify, distribute, and sell this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsync * documentation for any purpose is hereby granted without fee, provided that
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the above copyright notice appear in all copies and that both that
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copyright notice and this permission notice appear in supporting
45e9809aff7304721fddb95654901b32195c9c7avboxsync * documentation, and that the name of Keith Packard not be used in
45e9809aff7304721fddb95654901b32195c9c7avboxsync * advertising or publicity pertaining to distribution of the software without
45e9809aff7304721fddb95654901b32195c9c7avboxsync * specific, written prior permission. Keith Packard makes no
45e9809aff7304721fddb95654901b32195c9c7avboxsync * representations about the suitability of this software for any purpose. It
45e9809aff7304721fddb95654901b32195c9c7avboxsync * is provided "as is" without express or implied warranty.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
45e9809aff7304721fddb95654901b32195c9c7avboxsync * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
45e9809aff7304721fddb95654901b32195c9c7avboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45e9809aff7304721fddb95654901b32195c9c7avboxsync * PERFORMANCE OF THIS SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Thanks to Daniel Chemko <dchemko@intrinsyc.com> for making the 90 and 180
45e9809aff7304721fddb95654901b32195c9c7avboxsync * orientations work.
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define SCRLEFT(x,y,w,h) (pScreen->height - ((y) + (h)))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define FIRSTSHA(x,y,w,h) (((y) + (h) - 1) * shaStride + (x))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define SCRY(x,y,w,h) (pScreen->width - ((x) + (w)) - 1)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define FIRSTSHA(x,y,w,h) ((y) * shaStride + (x + w - 1))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define SCRLEFT(x,y,w,h) (pScreen->width - ((x) + (w)))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define SCRY(x,y,w,h) (pScreen->height - ((y) + (h)) - 1)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define FIRSTSHA(x,y,w,h) ((y + h - 1) * shaStride + (x + w - 1))
45e9809aff7304721fddb95654901b32195c9c7avboxsync fbGetDrawable (&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff, shaYoff);
45e9809aff7304721fddb95654901b32195c9c7avboxsync shaStride = shaStride * sizeof (FbBits) / sizeof (Data);
45e9809aff7304721fddb95654901b32195c9c7avboxsync ErrorF ("-> Entering Shadow Update:\r\n |- Origins: pShadow=%x, pScreen=%x, damage=%x\r\n |- Metrics: shaStride=%d, shaBase=%x, shaBpp=%d\r\n | \n", pShadow, pScreen, damage, shaStride, shaBase, shaBpp);
45e9809aff7304721fddb95654901b32195c9c7avboxsync ErrorF (" |-> Redrawing box - Metrics: X=%d, Y=%d, Width=%d, Height=%d\n", x, y, w, h);
45e9809aff7304721fddb95654901b32195c9c7avboxsync while (STEPDOWN(x,y,w,h))
45e9809aff7304721fddb95654901b32195c9c7avboxsync ErrorF (" | |-> StepDown - Metrics: width=%d, scr=%x, sha=%x\n", width, scr, sha);
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* how much remains in this window */
45e9809aff7304721fddb95654901b32195c9c7avboxsync ErrorF (" | | |-> Starting New Line - Metrics: winBase=%x, scrBase=%x, winSize=%d\r\n | | | Xstride=%d, Ystride=%d, w=%d h=%d\n", winBase, scrBase, winSize, SHASTEPX(shaStride), SHASTEPY(shaStride), w, h);
45e9809aff7304721fddb95654901b32195c9c7avboxsync ErrorF (" | | |-> Writing Line - Metrics: win=%x, sha=%x\n", win, sha);
45e9809aff7304721fddb95654901b32195c9c7avboxsync while (i--)
45e9809aff7304721fddb95654901b32195c9c7avboxsync ErrorF (" | | |-> Writing Pixel - Metrics: win=%x, sha=%d, remaining=%d\n", win, sha, i);
45e9809aff7304721fddb95654901b32195c9c7avboxsync } /* width */
45e9809aff7304721fddb95654901b32195c9c7avboxsync } /* STEPDOWN */
45e9809aff7304721fddb95654901b32195c9c7avboxsync } /* nbox */