diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-12-04 09:36:09 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-12-04 09:36:09 +0100 |
commit | 34c9eb6017e5709ee7addf4a1ef08fd614ad8c12 (patch) | |
tree | ab62ef41fe1c3345b22cbf036fc9132cd8ba508b | |
parent | d32a03020d88410b17189d4cc84d44c749a88161 (diff) |
DEBUG Patch: track DC deletionprivate/moggi/track-win-dc
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 4 | ||||
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi.cxx | 3 | ||||
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 3 | ||||
-rw-r--r-- | vcl/win/source/gdi/salvd.cxx | 6 | ||||
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 1 |
6 files changed, 19 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 1ff93cfa9241..43c804cf84bc 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -890,6 +890,7 @@ bool OpenGLContext::ImplInit() HGLRC hTempRC = wglCreateContext(m_aGLWin.hDC); if (hTempRC == NULL) { + SAL_DEBUG(m_aGLWin.hDC); ImplWriteLastError(GetLastError(), "wglCreateContext in OpenGLContext::ImplInit"); SAL_WARN("vcl.opengl", "wglCreateContext failed"); return false; @@ -914,6 +915,9 @@ bool OpenGLContext::ImplInit() m_aGLWin.hRC = wglCreateContextAttribsARB(m_aGLWin.hDC, hSharedCtx, NULL); if (m_aGLWin.hRC == 0) { + SAL_DEBUG(m_aGLWin.hDC); + SAL_DEBUG(hSharedCtx); + SAL_DEBUG(mbRequestVirtualDevice); ImplWriteLastError(GetLastError(), "wglCreateContextAttribsARB in OpenGLContext::ImplInit"); SAL_WARN("vcl.opengl", "wglCreateContextAttribsARB failed"); return false; diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index b32067d2d5d8..2edcf461f1df 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -825,9 +825,11 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ) BitBlt( hCopyDC, 0, 0, aBmp.bmWidth, aBmp.bmHeight, hBmpDC, 0, 0, SRCCOPY ); SelectObject( hCopyDC, hCopyOld ); + SAL_DEBUG("delete DC: " << hCopyDC); DeleteDC( hCopyDC ); SelectObject( hBmpDC, hBmpOld ); + SAL_DEBUG("delete DC: " << hBmpDC); DeleteDC( hBmpDC ); } } diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index c2d644dbb7a5..16ced9fc2f35 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -171,6 +171,7 @@ void ImplInitSalGDI() ::SelectObject( hMemDC, hBrushOld ), ::DeleteObject( hMemBrush ); ::SelectObject( hMemDC, hBmpOld ), ::DeleteObject( hMemBmp ); + SAL_DEBUG("delete DC: "<< hMemDC); ::DeleteDC( hMemDC ); if( bDither16 ) @@ -553,6 +554,7 @@ void ImplClearHDCCache( SalData* pData ) if( pC->mhDefPal ) SelectPalette( pC->mhDC, pC->mhDefPal, TRUE ); + SAL_DEBUG("delete DC: " << pC->mhDC); DeleteDC( pC->mhDC ); DeleteObject( pC->mhSelBmp ); } @@ -590,6 +592,7 @@ OpenGLCompatibleDC::~OpenGLCompatibleDC() if (mpImpl) { DeleteObject(mhBitmap); + SAL_DEBUG("delete DC: " << mhCompatibleDC); DeleteDC(mhCompatibleDC); } } diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 78226624ddaa..a557fad7dc78 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -1061,6 +1061,7 @@ static bool ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetu if ( pPrinter->mpGraphics ) { pPrinter->mpGraphics->DeInitGraphics(); + SAL_DEBUG("delete DC: " << pPrinter->mpGraphics->getHDC()); DeleteDC( pPrinter->mpGraphics->getHDC() ); delete pPrinter->mpGraphics; } @@ -1125,6 +1126,7 @@ WinSalInfoPrinter::~WinSalInfoPrinter() if ( mpGraphics ) { mpGraphics->DeInitGraphics(); + SAL_DEBUG("delete DC: " << mpGraphics->getHDC()); DeleteDC( mpGraphics->getHDC() ); delete mpGraphics; } @@ -1411,6 +1413,7 @@ WinSalPrinter::~WinSalPrinter() delete mpGraphics; } + SAL_DEBUG("delete DC: " << hDC); DeleteDC( hDC ); } diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx index 2b0046419090..6b7418a6a752 100644 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -138,7 +138,10 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, else { if ( hDC && !pData ) + { + SAL_DEBUG("delete DC: " << hDC); DeleteDC( hDC ); + } if ( hBmp ) DeleteBitmap( hBmp ); return NULL; @@ -175,7 +178,10 @@ WinSalVirtualDevice::~WinSalVirtualDevice() if( mhDefBmp ) SelectBitmap( mpGraphics->getHDC(), mhDefBmp ); if( !mbForeignDC ) + { + SAL_DEBUG("delete DC: " << mpGraphics->getHDC()); DeleteDC( mpGraphics->getHDC() ); + } if( mhBmp ) DeleteBitmap( mhBmp ); delete mpGraphics; diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index e7cc2939762c..1cf67d0318bd 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -4577,6 +4577,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) DrawFrameControl( memDC, &r, DFC_MENU, DFCS_MENUCHECK ); BitBlt( pDI->hDC, x, y+(lineHeight-checkHeight)/2, checkWidth, checkHeight, memDC, 0, 0, SRCAND ); DeleteObject( SelectObject( memDC, hOldBmp ) ); + SAL_DEBUG("delete DC: " << memDC); DeleteDC( memDC ); } x += checkWidth+3; |