Kaydet (Commit) 5b0f3cf8 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

opengl dr.memory: DC that contains selected object being deleted.

Change-Id: I3cfb09eacfa129a92dace47fd26ccf6e5d1a6756
üst a175977e
......@@ -155,6 +155,9 @@ private:
/// DIBSection that we use for the GDI drawing, and later obtain.
HBITMAP mhBitmap;
/// Return the previous bitmap to undo the SelectObject.
HBITMAP mhOrigBitmap;
/// DIBSection data.
sal_uInt32 *mpData;
......
......@@ -582,13 +582,14 @@ OpenGLCompatibleDC::OpenGLCompatibleDC(SalGraphics &rGraphics, int x, int y, int
mhBitmap = WinSalVirtualDevice::ImplCreateVirDevBitmap(mhCompatibleDC, width, height, 32, reinterpret_cast<void **>(&mpData));
SelectObject(mhCompatibleDC, mhBitmap);
mhOrigBitmap = (HBITMAP) SelectObject(mhCompatibleDC, mhBitmap);
}
OpenGLCompatibleDC::~OpenGLCompatibleDC()
{
if (mpImpl)
{
SelectObject(mhCompatibleDC, mhOrigBitmap);
DeleteObject(mhBitmap);
DeleteDC(mhCompatibleDC);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment