vbva.c revision e64031e20c39650a7bc902a3e1aba613b9415dee
/** @file
*
* VirtualBox Windows NT/2000/XP guest video driver
*
* VBVA dirty rectangles calculations.
*
* Copyright (C) 2006-2007 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "driver.h"
#ifdef VBOX_VBVA_ADJUST_RECT
/*to*/ int cbPixelTo)
{
BYTE r, g, b;
ULONG ulConvertedPixel = 0;
switch (cbPixelFrom)
{
case 4:
{
switch (cbPixelTo)
{
case 3:
{
} break;
case 2:
{
b = (BYTE)(ulConvertedPixel);
} break;
}
} break;
case 3:
{
switch (cbPixelTo)
{
case 2:
{
b = (BYTE)(ulConvertedPixel);
} break;
}
} break;
}
return ulConvertedPixel;
}
{
int x, y;
int fTopNonEqualFound;
int yTopmost;
int yBottommost;
int cbPixelSrc;
int cbPixelDest;
{
return TRUE;
}
));
switch (psoDest->iBitmapFormat)
{
default: cbPixelDest = 0;
}
switch (psoSrc->iBitmapFormat)
{
default: cbPixelSrc = 0;
}
if (cbPixelDest == 0 || cbPixelSrc == 0)
{
DISPDBG((1, "vbvaFindChangedRect: unsupported pixel format src %d dst %d\n", psoDest->iBitmapFormat, psoSrc->iBitmapFormat));
return TRUE;
}
{
DISPDBG((1, "vbvaFindChangedRect: empty dest rect: %d-%d, %d-%d\n", rclDest.left, rclDest.right, rclDest.top, rclDest.bottom));
return FALSE;
}
{
DISPDBG((1, "vbvaFindChangedRect: empty src rect: %d-%d, %d-%d\n", rclSrc.left, rclSrc.right, rclSrc.top, rclSrc.bottom));
return FALSE;
}
/*
* Compare the content of the screen surface (psoDest) with the source surface (psoSrc).
* Update the prclDest with the rectangle that will be actually changed after
* copying the source bits to the screen.
*/
pu8Dest = (BYTE *)psoDest->pvScan0 + psoDest->lDelta * prclDest->top + cbPixelDest * prclDest->left;
/* Use the rclDest as the bounding rectangle for the changed area. */
fTopNonEqualFound = 0;
{
int fLeftNonEqualFound = 0;
/* Init to an empty line. */
{
int fEqualPixels;
if (cbPixelSrc == cbPixelDest)
{
}
else
{
/* Convert larger pixel to the smaller pixel format. */
if (cbPixelSrc > cbPixelDest)
{
/* Convert the source pixel to the destination pixel format. */
/*to*/ cbPixelDest);
}
else
{
/* Convert the destination pixel to the source pixel format. */
/*to*/ cbPixelSrc);
}
}
if (fEqualPixels)
{
/* Equal pixels. */
if (!fLeftNonEqualFound)
{
xLeftmost = x;
}
}
else
{
fLeftNonEqualFound = 1;
xRightmost = x;
}
pu8SrcLine += cbPixelSrc;
}
/* min */
{
}
/* max */
{
}
{
/* Empty line. */
if (!fTopNonEqualFound)
{
yTopmost = y;
}
}
else
{
fTopNonEqualFound = 1;
yBottommost = y;
}
}
/* min */
{
}
/* max */
{
}
/* rclDest was calculated with right-bottom inclusive.
* The following checks and the caller require exclusive coords.
*/
));
/* Update the rectangle with the changed area. */
{
/* Empty rect. */
return FALSE;
}
return TRUE;
}
#endif /* VBOX_VBVA_ADJUST_RECT */
{
if (ppdev)
{
}
return;
}
{
if (prcl)
{
}
}
{
}
{
if (prcl)
{
}
else if (pco)
{
}
}
void vbvaBitBlt (
{
}
void vbvaTextOut(
)
{
}
void vbvaLineTo(
)
{
}
void vbvaStretchBlt(
)
{
}
void vbvaCopyBits(
)
{
}
void vbvaPaint(
)
{
}
void vbvaFillPath(
)
{
}
void vbvaStrokePath(
)
{
}
void vbvaStrokeAndFillPath(
)
{
}
void vbvaSaveScreenBits(
ULONG_PTR ident,
)
{
}