summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
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/skia
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/skia')
-rw-r--r--vcl/inc/skia/win/gdiimpl.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/inc/skia/win/gdiimpl.hxx b/vcl/inc/skia/win/gdiimpl.hxx
index 6bd52b073aa5..321f35f24366 100644
--- a/vcl/inc/skia/win/gdiimpl.hxx
+++ b/vcl/inc/skia/win/gdiimpl.hxx
@@ -16,6 +16,9 @@
#include <skia/gdiimpl.hxx>
#include <win/salgdi.h>
#include <win/wingdiimpl.hxx>
+#include <o3tl/lru_map.hxx>
+#include <ControlCacheKey.hxx>
+#include <svdata.hxx>
class ControlCacheKey;
namespace sk_app
@@ -34,6 +37,9 @@ public:
virtual bool wantsTextColorWhite() const override { return true; }
+ SkBitmap getAsBitmap();
+ SkBitmap getAsMaskBitmap();
+
struct Texture;
};
@@ -80,6 +86,19 @@ private:
std::unique_ptr<sk_app::WindowContext> mWindowContext;
};
+typedef std::pair<ControlCacheKey, SkBitmap> SkiaControlCachePair;
+typedef o3tl::lru_map<ControlCacheKey, SkBitmap, ControlCacheHashFunction> SkiaControlCacheType;
+
+class SkiaControlsCache
+{
+ SkiaControlCacheType cache;
+
+ SkiaControlsCache();
+
+public:
+ static SkiaControlCacheType& get();
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */