diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-11-12 10:57:30 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-27 09:55:16 +0100 |
commit | d662fcdc646c2c4b1bc734350ac4c28115b43a24 (patch) | |
tree | 15c2bd1432ada2e42501116c8d7c26011d42801e /vcl/inc/skia | |
parent | 805e75bd790cd9b3e49ace69beee96d21163f7a6 (diff) |
avoid repeated SkSurface recreating because of X11 being asynchronous
Sometimes VCL and X11 (and thus Skia) will have a different idea
about what the size of a window is. Check for the mismatch and avoid
recreating if it wouldn't do anything.
Change-Id: Icf3ebba9589cc6f12612e5f280840346cb0edaeb
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r-- | vcl/inc/skia/gdiimpl.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/skia/x11/gdiimpl.hxx | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx index 8225e76d27ff..04f96cb7bd11 100644 --- a/vcl/inc/skia/gdiimpl.hxx +++ b/vcl/inc/skia/gdiimpl.hxx @@ -208,6 +208,8 @@ protected: void checkSurface(); void recreateSurface(); void destroySurface(); + // Reimplemented for X11. + virtual bool avoidRecreateByResize() const { return false; } void privateDrawAlphaRect(long nX, long nY, long nWidth, long nHeight, double nTransparency, bool blockAA = false); diff --git a/vcl/inc/skia/x11/gdiimpl.hxx b/vcl/inc/skia/x11/gdiimpl.hxx index 1c40aa6b2c28..1dc5064e6667 100644 --- a/vcl/inc/skia/x11/gdiimpl.hxx +++ b/vcl/inc/skia/x11/gdiimpl.hxx @@ -37,6 +37,7 @@ public: protected: virtual void createSurface() override; virtual void performFlush() override; + virtual bool avoidRecreateByResize() const override; private: std::unique_ptr<sk_app::WindowContext> mWindowContext; |