mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
x11drv: Copy the whole image at once if appropriate.
This commit is contained in:
parent
2cba6e32a8
commit
729eaa6920
@ -75,8 +75,16 @@ static void convert_5x5_asis(int width, int height,
|
||||
{
|
||||
int y;
|
||||
|
||||
width *= 2;
|
||||
|
||||
if (srclinebytes == dstlinebytes && srclinebytes == width)
|
||||
{
|
||||
memcpy(dstbits, srcbits, height * width);
|
||||
return;
|
||||
}
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
memcpy(dstbits, srcbits, width*2);
|
||||
memcpy(dstbits, srcbits, width);
|
||||
srcbits = (const char*)srcbits + srclinebytes;
|
||||
dstbits = (char*)dstbits + dstlinebytes;
|
||||
}
|
||||
@ -563,8 +571,16 @@ static void convert_888_asis(int width, int height,
|
||||
{
|
||||
int y;
|
||||
|
||||
width *= 3;
|
||||
|
||||
if (srclinebytes == dstlinebytes && srclinebytes == width)
|
||||
{
|
||||
memcpy(dstbits, srcbits, height * width);
|
||||
return;
|
||||
}
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
memcpy(dstbits, srcbits, width*3);
|
||||
memcpy(dstbits, srcbits, width);
|
||||
srcbits = (const char*)srcbits + srclinebytes;
|
||||
dstbits = (char*)dstbits + dstlinebytes;
|
||||
}
|
||||
@ -953,8 +969,16 @@ static void convert_0888_asis(int width, int height,
|
||||
{
|
||||
int y;
|
||||
|
||||
width *= 4;
|
||||
|
||||
if (srclinebytes == dstlinebytes && srclinebytes == width)
|
||||
{
|
||||
memcpy(dstbits, srcbits, height * width);
|
||||
return;
|
||||
}
|
||||
|
||||
for (y=0; y<height; y++) {
|
||||
memcpy(dstbits, srcbits, width*4);
|
||||
memcpy(dstbits, srcbits, width);
|
||||
srcbits = (const char*)srcbits + srclinebytes;
|
||||
dstbits = (char*)dstbits + dstlinebytes;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user