Evas GDI engine: save the original bitmap into the memory DC

This allows the memory DC to be killed and fix a memory leak

@fix
This commit is contained in:
Vincent Torri 2015-07-23 09:52:31 +02:00 committed by Tom Hacohen
parent ff6dbb17e3
commit 07af170bd8
1 changed files with 13 additions and 10 deletions

View File

@ -59,18 +59,21 @@ evas_software_gdi_output_buffer_paste(Gdi_Output_Buffer *gdiob,
int y)
{
HDC dc;
HGDIOBJ obj;
dc = CreateCompatibleDC(gdiob->dc);
if (!dc)
return;
SelectObject(dc, gdiob->bitmap);
BitBlt(gdiob->dc,
x, y,
gdiob->width, gdiob->height,
dc,
0, 0,
SRCCOPY);
DeleteDC(dc);
if (dc)
{
obj = SelectObject(dc, gdiob->bitmap);
BitBlt(gdiob->dc,
x, y,
gdiob->width, gdiob->height,
dc,
0, 0,
SRCCOPY);
SelectObject(dc, obj);
DeleteDC(dc);
}
}
DATA8 *