summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-06-19 16:03:06 -0400
committerPatrick Luby <guibomacdev@gmail.com>2024-06-25 21:34:25 +0200
commit12dbf0e6b6b485a1d73c7e33bd0ecfb13e6efdac (patch)
treec66d234c4e4ba9772e3ddc20237d0811b28b965c /vcl/inc/skia
parent4acedb794c1ba0de24f2c8703e07d7f2d5143bdb (diff)
tdf#159175 Do not allocate a CGLayer for each NSWindow when using Skia
Skia surfaces can be copied directly to an NSWindow's CGContextRef so disable allocation of a CGLayer for each NSWindow to significantly reduce memory usage when Skia is enabled. Change-Id: I8e3001e4f2ae8dd36156c06db68447c6b1bc67df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169242 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r--vcl/inc/skia/osx/gdiimpl.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/inc/skia/osx/gdiimpl.hxx b/vcl/inc/skia/osx/gdiimpl.hxx
index b97245e86e11..b60280a09e6b 100644
--- a/vcl/inc/skia/osx/gdiimpl.hxx
+++ b/vcl/inc/skia/osx/gdiimpl.hxx
@@ -44,11 +44,13 @@ public:
virtual void Flush(const tools::Rectangle&) override;
virtual void WindowBackingPropertiesChanged() override;
+ CGImageRef createCGImageFromRasterSurface(const NSRect& rDirtyRect, CGPoint& rImageOrigin,
+ bool& rImageFlipped);
+
private:
virtual int getWindowScaling() const override;
virtual void createWindowSurfaceInternal(bool forceRaster = false) override;
virtual void flushSurfaceToWindowContext() override;
- void flushSurfaceToScreenCG();
static inline sk_sp<SkFontMgr> fontManager;
};