[Libreoffice-bugs] [Bug 137468] Severe performance degradation on a macOS with a 5K display

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Oct 17 13:05:54 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=137468

--- Comment #2 from Leo Wang <ilford at gmail.com> ---
Another patch to create a bitmap with the color space of the main display, thus
slightly improves rendering performance.

But there are still layers of other color spaces, so there are still pixel
format conversions.

diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index 5235f657f8ca..4f00e268e711 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -51,7 +51,6 @@ SalData::SalData()
     mpFirstPrinter( nullptr ),
     mpFontList( nullptr ),
     mpStatusItem( nil ),
-    mxRGBSpace( CGColorSpaceCreateWithName(kCGColorSpaceSRGB) ),
     mxGraySpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericGrayGamma2_2)
),
     maCursors(),
     mbIsScrollbarDoubleMax( false ),
@@ -66,6 +65,10 @@ SalData::SalData()
     maCursors.fill( INVALID_CURSOR_PTR );
     if( s_aAutoReleaseKey == nullptr )
         s_aAutoReleaseKey = osl_createThreadKey( releasePool );
+
+    CGDirectDisplayID did = CGMainDisplayID();
+    CGColorSpaceRef cs = CGDisplayCopyColorSpace(did);
+    mxRGBSpace = cs;
 }

 SalData::~SalData()

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201017/ddf90a6f/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list