mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
bitblt srcpy optimze it can be more optimze
svn path=/trunk/; revision=15750
This commit is contained in:
parent
47418050f9
commit
5a2cbdf365
1 changed files with 27 additions and 4 deletions
|
@ -308,6 +308,7 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo)
|
||||||
|
|
||||||
switch (BltInfo->Rop4)
|
switch (BltInfo->Rop4)
|
||||||
{
|
{
|
||||||
|
|
||||||
case ROP4_BLACKNESS:
|
case ROP4_BLACKNESS:
|
||||||
//return(0x00000000);
|
//return(0x00000000);
|
||||||
|
|
||||||
|
@ -376,17 +377,39 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo)
|
||||||
#endif
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ROP4_SRCCOPY:
|
case ROP4_SRCCOPY:
|
||||||
// return(Source);
|
// return(Source);
|
||||||
switch (BltInfo->SourceSurface->iBitmapFormat)
|
switch (BltInfo->SourceSurface->iBitmapFormat)
|
||||||
{
|
{
|
||||||
case BMF_1BPP:
|
case BMF_1BPP:
|
||||||
break;
|
case BMF_4BPP:
|
||||||
case BMF_4BPP:
|
|
||||||
break;
|
|
||||||
case BMF_16BPP:
|
case BMF_16BPP:
|
||||||
break;
|
|
||||||
case BMF_24BPP:
|
case BMF_24BPP:
|
||||||
|
{
|
||||||
|
PBYTE byteaddr = BltInfo->SourceSurface->pvScan0 + BltInfo->DestRect.top * BltInfo->SourceSurface->lDelta;
|
||||||
|
PDWORD addr = (PDWORD)byteaddr + BltInfo->DestRect.left;
|
||||||
|
LONG xlDelta = BltInfo->SourceSurface->lDelta - (BltInfo->DestRect.right - BltInfo->DestRect.left) ;
|
||||||
|
|
||||||
|
SourceY = BltInfo->SourcePoint.y;
|
||||||
|
|
||||||
|
for (DestY=BltInfo->DestRect.top; DestY<BltInfo->DestRect.bottom; DestY++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (SourceY > BltInfo->SourceSurface->sizlBitmap.cy) break;
|
||||||
|
|
||||||
|
SourceX = BltInfo->SourcePoint.x;
|
||||||
|
|
||||||
|
for (DestX=BltInfo->DestRect.left; DestX<BltInfo->DestRect.right; DestX++, SourceX++, addr++)
|
||||||
|
{
|
||||||
|
if (SourceX > BltInfo->SourceSurface->sizlBitmap.cx) break;
|
||||||
|
|
||||||
|
*addr = DIB_GetSource(BltInfo->SourceSurface, SourceX,
|
||||||
|
SourceY, BltInfo->XlateSourceToDest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addr+=xlDelta;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BMF_32BPP:
|
case BMF_32BPP:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue