mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 13:21:39 +00:00
- Apply a fix by Timo Kreuzer for the bug spotted by Evgeniy Boltik. 4 failures less in "gdi32_winetest.exe bitmap" now.
See issue #4326 for more details. svn path=/trunk/; revision=40332
This commit is contained in:
parent
b9451c3494
commit
35e7c09e4b
1 changed files with 14 additions and 9 deletions
|
@ -62,8 +62,11 @@ DIB_1BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
DIB_1BPP_BitBltSrcCopy_From1BPP (
|
DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
SURFOBJ* DestSurf, SURFOBJ* SourceSurf,
|
SURFOBJ* DestSurf,
|
||||||
PRECTL DestRect, POINTL *SourcePoint )
|
SURFOBJ* SourceSurf,
|
||||||
|
XLATEOBJ* pxlo,
|
||||||
|
PRECTL DestRect,
|
||||||
|
POINTL *SourcePoint )
|
||||||
{
|
{
|
||||||
// the 'window' in this sense is the x-position that corresponds
|
// the 'window' in this sense is the x-position that corresponds
|
||||||
// to the left-edge of the 8-pixel byte we are currently working with.
|
// to the left-edge of the 8-pixel byte we are currently working with.
|
||||||
|
@ -88,9 +91,9 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
int dy2; // dest y end
|
int dy2; // dest y end
|
||||||
int sy1; // src y start
|
int sy1; // src y start
|
||||||
|
|
||||||
int dx;
|
int dx;
|
||||||
int shift;
|
int shift;
|
||||||
BYTE srcmask, dstmask;
|
BYTE srcmask, dstmask, xormask;
|
||||||
|
|
||||||
// 'd' and 's' are the dest & src buffer pointers that I use on my x-sweep
|
// 'd' and 's' are the dest & src buffer pointers that I use on my x-sweep
|
||||||
// 'pd' and 'ps' are the dest & src buffer pointers used on the inner y-sweep
|
// 'pd' and 'ps' are the dest & src buffer pointers used on the inner y-sweep
|
||||||
|
@ -99,6 +102,8 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
|
|
||||||
shift = (dl-sl)&7;
|
shift = (dl-sl)&7;
|
||||||
|
|
||||||
|
xormask = 0xFF * XLATEOBJ_iXlate(pxlo, 0);
|
||||||
|
|
||||||
if ( DestRect->top <= SourcePoint->y )
|
if ( DestRect->top <= SourcePoint->y )
|
||||||
{
|
{
|
||||||
// moving up ( scan top -> bottom )
|
// moving up ( scan top -> bottom )
|
||||||
|
@ -164,7 +169,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
{
|
{
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
*pd = (BYTE)((*pd & dstmask) | (*ps & srcmask));
|
*pd = (BYTE)((*pd & dstmask) | ((ps[0]^xormask) & srcmask));
|
||||||
|
|
||||||
// this *must* be here, because we could be going up *or* down...
|
// this *must* be here, because we could be going up *or* down...
|
||||||
if ( dy == dy2 )
|
if ( dy == dy2 )
|
||||||
|
@ -179,7 +184,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
*pd = (BYTE)((*pd & dstmask)
|
*pd = (BYTE)((*pd & dstmask)
|
||||||
| ( ( ps[1] >> shift ) & srcmask ));
|
| ( ( (ps[1]^xormask) >> shift ) & srcmask ));
|
||||||
|
|
||||||
// this *must* be here, because we could be going up *or* down...
|
// this *must* be here, because we could be going up *or* down...
|
||||||
if ( dy == dy2 )
|
if ( dy == dy2 )
|
||||||
|
@ -194,7 +199,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
*pd = (*pd & dstmask)
|
*pd = (*pd & dstmask)
|
||||||
| ( ( ps[0] << ( 8 - shift ) ) & srcmask );
|
| ( ( (ps[0]^xormask) << ( 8 - shift ) ) & srcmask );
|
||||||
|
|
||||||
// this *must* be here, because we could be going up *or* down...
|
// this *must* be here, because we could be going up *or* down...
|
||||||
if ( dy == dy2 )
|
if ( dy == dy2 )
|
||||||
|
@ -209,7 +214,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
*pd = (*pd & dstmask)
|
*pd = (*pd & dstmask)
|
||||||
| ( ( ( (ps[1])|(ps[0]<<8) ) >> shift ) & srcmask );
|
| ( ( ( ((ps[1]^xormask))|((ps[0]^xormask)<<8) ) >> shift ) & srcmask );
|
||||||
|
|
||||||
// this *must* be here, because we could be going up *or* down...
|
// this *must* be here, because we could be going up *or* down...
|
||||||
if ( dy == dy2 )
|
if ( dy == dy2 )
|
||||||
|
@ -239,7 +244,7 @@ DIB_1BPP_BitBltSrcCopy(PBLTINFO BltInfo)
|
||||||
switch ( BltInfo->SourceSurface->iBitmapFormat )
|
switch ( BltInfo->SourceSurface->iBitmapFormat )
|
||||||
{
|
{
|
||||||
case BMF_1BPP:
|
case BMF_1BPP:
|
||||||
DIB_1BPP_BitBltSrcCopy_From1BPP ( BltInfo->DestSurface, BltInfo->SourceSurface, &BltInfo->DestRect, &BltInfo->SourcePoint );
|
DIB_1BPP_BitBltSrcCopy_From1BPP ( BltInfo->DestSurface, BltInfo->SourceSurface, BltInfo->XlateSourceToDest, &BltInfo->DestRect, &BltInfo->SourcePoint );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BMF_4BPP:
|
case BMF_4BPP:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue