mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
thx agein blight and alex.
we got alot faster blt for source copy for 32bpp to 32bpp now. svn path=/trunk/; revision=15743
This commit is contained in:
parent
848d499f3d
commit
253b2e8c8a
1 changed files with 47 additions and 0 deletions
|
@ -305,6 +305,8 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo)
|
|||
BOOL UsesSource;
|
||||
BOOL UsesPattern;
|
||||
PULONG DestBits;
|
||||
LONG DesmaxX, DesmaxY;
|
||||
LONG SrcmaxX, SrcmaxY;
|
||||
|
||||
switch (BltInfo->Rop4)
|
||||
{
|
||||
|
@ -378,6 +380,51 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo)
|
|||
#endif
|
||||
return TRUE;
|
||||
break;
|
||||
case ROP4_SRCCOPY:
|
||||
// return(Source);
|
||||
switch (BltInfo->SourceSurface->iBitmapFormat)
|
||||
{
|
||||
case BMF_1BPP:
|
||||
break;
|
||||
case BMF_4BPP:
|
||||
break;
|
||||
case BMF_8BPP:
|
||||
break;
|
||||
case BMF_16BPP:
|
||||
break;
|
||||
case BMF_24BPP:
|
||||
break;
|
||||
case BMF_32BPP:
|
||||
SrcmaxX = BltInfo->SourceSurface->sizlBitmap.cx - BltInfo->SourcePoint.x;
|
||||
SrcmaxY = BltInfo->SourceSurface->sizlBitmap.cy - BltInfo->SourcePoint.y;
|
||||
|
||||
/* calc the dst BMP size */
|
||||
DesmaxX = BltInfo->DestRect.right - BltInfo->DestRect.left;
|
||||
DesmaxY = BltInfo->DestRect.bottom - BltInfo->DestRect.top;
|
||||
|
||||
/* calc max X and Y size to blt */
|
||||
if (DesmaxX > SrcmaxX ) DesmaxX = SrcmaxX;
|
||||
if (DesmaxY > SrcmaxY ) DesmaxY = SrcmaxY;
|
||||
|
||||
/* do blt */
|
||||
INT Destdelta = BltInfo->DestSurface->lDelta;
|
||||
INT Sourcedelta = BltInfo->SourceSurface->lDelta;
|
||||
register PBYTE Destaddr = BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * Destdelta + BltInfo->DestRect.left;
|
||||
register PBYTE Srcaddr = BltInfo->SourceSurface->pvScan0 + BltInfo->SourcePoint.y * Sourcedelta + BltInfo->SourcePoint.x;
|
||||
|
||||
DesmaxX *= 4;
|
||||
while (--DesmaxY)
|
||||
{
|
||||
RtlCopyMemory(Destaddr, Srcaddr, DesmaxX);
|
||||
Destaddr += Destdelta;
|
||||
Srcaddr += Sourcedelta;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue