summaryrefslogtreecommitdiff
path: root/vcl/inc/ControlCacheKey.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-31 11:47:18 +0100
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:13 +0100
commit31b2c10484fc265ff0f05ce405c2ed5b982f8714 (patch)
treec2417156e30bff34610ca49943a73794d21adea4 /vcl/inc/ControlCacheKey.hxx
parent840f55c0f6e21d00b51e4a52824c7eb7f938122f (diff)
implement Skia native controls drawing/caching for Windows
This actually fixes a number of drawing problems (e.g. highlight in popup menus), it seems the other code path is buggy. Change-Id: Iea697f577d08d20e338224d5ff5b3bf7b653f8d1
Diffstat (limited to 'vcl/inc/ControlCacheKey.hxx')
-rw-r--r--vcl/inc/ControlCacheKey.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/inc/ControlCacheKey.hxx b/vcl/inc/ControlCacheKey.hxx
index 11d4ce07d719..06a1ff97bd8d 100644
--- a/vcl/inc/ControlCacheKey.hxx
+++ b/vcl/inc/ControlCacheKey.hxx
@@ -22,6 +22,7 @@
#include <tools/gen.hxx>
#include <vcl/salnativewidgets.hxx>
+#include <boost/functional/hash.hpp>
class ControlCacheKey
{
@@ -76,4 +77,18 @@ public:
}
};
+struct ControlCacheHashFunction
+{
+ std::size_t operator()(ControlCacheKey const& aCache) const
+ {
+ std::size_t seed = 0;
+ boost::hash_combine(seed, aCache.mnType);
+ boost::hash_combine(seed, aCache.mnPart);
+ boost::hash_combine(seed, aCache.mnState);
+ boost::hash_combine(seed, aCache.maSize.Width());
+ boost::hash_combine(seed, aCache.maSize.Height());
+ return seed;
+ }
+};
+
#endif // INCLUDED_VCL_INC_CONTROLCACHEKEY_HXX