Skip to content

Commit

Permalink
Fix: change Quartz driver colorSpace handling to address certain macO…
Browse files Browse the repository at this point in the history
…S performance issues (#7644)
  • Loading branch information
andythenorth committed Sep 7, 2019
1 parent 381c2a4 commit 895c00c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/cocoa/wnd_quartz.mm
Expand Up @@ -113,7 +113,7 @@ static CGColorSpaceRef QZ_GetCorrectColorSpace()
if (colorSpace == NULL) {
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (MacOSVersionIsAtLeast(10, 5, 0)) {
colorSpace = CGDisplayCopyColorSpace(CGMainDisplayID());
colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
} else
#endif
{
Expand Down Expand Up @@ -289,7 +289,7 @@ - (void)drawRect:(NSRect)invalidRect
styleMask:style
backing:NSBackingStoreBuffered
defer:NO ];

[ this->window setColorSpace: [ [ [ NSColorSpace alloc ] initWithCGColorSpace:QZ_GetCorrectColorSpace() ] autorelease ] ];
if (this->window == nil) {
DEBUG(driver, 0, "Could not create the Cocoa window.");
this->setup = false;
Expand Down

0 comments on commit 895c00c

Please sign in to comment.