mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
gdi32: Avoid creating a copy of the pattern bits for the R2_COPYPEN case.
This commit is contained in:
parent
7339308e16
commit
a796ad5ed8
@ -1782,7 +1782,7 @@ static BOOL alloc_brush_mask_bits( dib_brush *brush )
|
||||
|
||||
static void free_brush_mask_bits( dib_brush *brush )
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, brush->masks.and);
|
||||
if (brush->masks.xor != brush->dib.bits.ptr) HeapFree(GetProcessHeap(), 0, brush->masks.xor);
|
||||
brush->masks.and = brush->masks.xor = NULL;
|
||||
}
|
||||
|
||||
@ -1798,6 +1798,12 @@ static BOOL create_pattern_brush_bits( dib_brush *brush )
|
||||
DWORD *brush_bits = brush->dib.bits.ptr;
|
||||
DWORD *and_bits, *xor_bits;
|
||||
|
||||
if (brush->rop == R2_COPYPEN)
|
||||
{
|
||||
brush->masks.xor = brush_bits; /* use the pattern bits directly */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!alloc_brush_mask_bits( brush )) return FALSE;
|
||||
|
||||
and_bits = brush->masks.and;
|
||||
|
Loading…
Reference in New Issue
Block a user