From 72100ac7cff7485db3e869f1331caddb0bc21a24 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 20 Apr 2005 12:25:28 +0000 Subject: Fix includes right throughout the Xserver tree: * change "foo.h" to for core headers, e.g. X.h, Xpoll.h; * change "foo.h", "extensions/foo.h" and "X11/foo.h" to for extension headers, e.g. Xv.h; * change "foo.[ch]" to for Xtrans files. --- src/i810_video.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'src/i810_video.c') diff --git a/src/i810_video.c b/src/i810_video.c index 2855178c..94487e73 100644 --- a/src/i810_video.c +++ b/src/i810_video.c @@ -23,7 +23,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_video.c,v 1.24 2003/09/08 14:25:29 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_video.c,v 1.26 2003/11/10 18:22:22 tsi Exp $ */ /* * i810_video.c: i810 Xv driver. Based on the mga Xv driver by Mark Vojkovich. @@ -46,7 +46,7 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "i810.h" #include "xf86xv.h" -#include "Xv.h" +#include #include "xaa.h" #include "xaalocal.h" #include "dixstruct.h" @@ -420,7 +420,7 @@ I810SetupImageVideo(ScreenPtr pScreen) pPriv->currentBuf = 0; /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPriv->clip, NullBox, 0); + REGION_NULL(pScreen, &pPriv->clip); pI810->adaptor = adapt; @@ -765,9 +765,9 @@ I810DisplayVideo( } else { overlay->OV0CONF = 0; /* two 720 pixel line buffers */ } - + overlay->SHEIGHT = height | (height << 15); - overlay->DWINPOS = (dstBox->y1 << 16) | dstBox->x1; + overlay->DWINPOS = (dstBox->y1 << 16) | (dstBox->x1); overlay->DWINSZ = ((dstBox->y2 - dstBox->y1) << 16) | (dstBox->x2 - dstBox->x1); @@ -991,14 +991,18 @@ I810PutImage( dstBox.y2 = drw_y + drw_h; I810ClipVideo(&dstBox, &x1, &x2, &y1, &y2, - REGION_EXTENTS(pScreen, clipBoxes), width, height); - + REGION_EXTENTS(pScrn->pScreen, clipBoxes), width, height); + if((x1 >= x2) || (y1 >= y2)) return Success; - - dstBox.x1 -= pScrn->frameX0; - dstBox.x2 -= pScrn->frameX0; - dstBox.y1 -= pScrn->frameY0; + /* + * Fix for 4 pixel granularity of AdjustFrame + * unless boarder is clipped by frame + */ + dstBox.x1 -= (pScrn->frameX0 & + ((dstBox.x1 == pScrn->frameX0) ? ~0x0UL : ~0x3UL)); + dstBox.x2 -= (pScrn->frameX0 & ~0x3); + dstBox.y1 -= pScrn->frameY0; dstBox.y2 -= pScrn->frameY0; switch(id) { @@ -1079,7 +1083,6 @@ I810PutImage( xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes); } - I810DisplayVideo(pScrn, id, width, height, dstPitch, x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); @@ -1336,8 +1339,13 @@ I810DisplaySurface( REGION_EXTENTS(screenInfo.screens[0], clipBoxes), surface->width, surface->height); - dstBox.x1 -= pScrn->frameX0; - dstBox.x2 -= pScrn->frameX0; + /* + * Fix for 4 pixel granularity of AdjustFrame + * unless boarder is clipped by frame + */ + dstBox.x1 -= (pScrn->frameX0 & + ((dstBox.x1 == pScrn->frameX0) ? ~0x0UL : ~0x3UL)); + dstBox.x2 -= (pScrn->frameX0 & ~0x3); dstBox.y1 -= pScrn->frameY0; dstBox.y2 -= pScrn->frameY0; -- cgit v1.2.3