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