mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-20 13:21:05 +00:00
Improve OS X performance using the same display's color space to blit to the screen
This commit is contained in:
parent
5293d9cce5
commit
19545c12e3
@ -300,7 +300,8 @@ private:
|
||||
{
|
||||
NSGraphicsContext* gc = [NSGraphicsContext currentContext];
|
||||
CGContextRef cg = (CGContextRef)[gc graphicsPort];
|
||||
CGImageRef img = SkCreateCGImageRef(bitmap);
|
||||
CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(CGMainDisplayID());
|
||||
CGImageRef img = SkCreateCGImageRefWithColorspace(bitmap, colorSpace);
|
||||
if (img) {
|
||||
CGRect r = CGRectMake(viewBounds.origin.x+rect.x,
|
||||
viewBounds.origin.y+rect.y,
|
||||
@ -312,6 +313,7 @@ private:
|
||||
CGContextRestoreGState(cg);
|
||||
CGImageRelease(img);
|
||||
}
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
}
|
||||
bitmap.unlockPixels();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user