<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Severe performance degradation on a macOS with a 5K display"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=137468#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Severe performance degradation on a macOS with a 5K display"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=137468">bug 137468</a>
              from <span class="vcard"><a class="email" href="mailto:ilford@gmail.com" title="Leo Wang <ilford@gmail.com>"> <span class="fn">Leo Wang</span></a>
</span></b>
        <pre>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()</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>