summaryrefslogtreecommitdiff
path: root/vcl/inc/win/salframe.h
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-03-14 20:05:50 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2018-03-19 13:31:47 +0100
commit8939cb9456ee76a848cc8089747f280751092cf8 (patch)
tree0e55309604950528c21d98f4cf6a7071f09b42a3 /vcl/inc/win/salframe.h
parentb120932c77332f95ae40d7bd96b972ce87e7693a (diff)
tdf#115420 fix DC usecount and drop wrong asserts
For DC initialization we check the thread ID to assign a normal or cached DC to the corresponding WinSalGraphics variable. The cached DC has a usage count, as there are some limits on cached DCs count (DCX_CACHE). But for the WinSalGraphics DC init and release the variable just matters for the accounting, and generally which thread is doing the calls: the non-main thread always has to relay them to the main application thread. Since we're releasing all WinSalGraphics in ~WinSalFrame and do all release and re-init in ImplSetParentFrame, there is no way to correspond the thread ID to the WinSalGraphics variable. So this drops the wrong assertions based on the WinSalGraphics variables and renames the GETDC message to GETCACHEDDC to make usage of a cached DC (DCX_CACHE) more obvious. As a consequence of the different release DC handling this also fixes the accounting of the cached DCs, wich was broken in the initial fix; commit c15ea73f960bbd3d2a4b0c43b467ac62eeba3505 Change-Id: I11ce52a1b4005f26567f92588437fa37bf227a2e Reviewed-on: https://gerrit.libreoffice.org/51318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/win/salframe.h')
-rw-r--r--vcl/inc/win/salframe.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 77902a40034e..36e4a041c955 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -33,8 +33,8 @@ public:
HWND mhWnd; // Window handle
HCURSOR mhCursor; // cursor handle
HIMC mhDefIMEContext; // default IME-Context
- WinSalGraphics* mpLocalGraphics; // current local frame graphics
- WinSalGraphics* mpThreadGraphics; // current frame graphics for other threads
+ WinSalGraphics* mpLocalGraphics; // current main thread frame graphics
+ WinSalGraphics* mpThreadGraphics; // current frame graphics for other threads (DCX_CACHE)
WinSalFrame* mpNextFrame; // pointer to next frame
HMENU mSelectedhMenu; // the menu where highlighting is currently going on
HMENU mLastActivatedhMenu; // the menu that was most recently opened