Skip to content

Commit

Permalink
Retain the reference color space (TextureGroup#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adlai-Holler authored and bernieperez committed Apr 25, 2018
1 parent 0063b2a commit ef1d6f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Details/ASGraphicsContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ extern void ASGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGF
dispatch_once(&onceToken, ^{
UIGraphicsBeginImageContextWithOptions(CGSizeMake(1, 1), YES, 0);
UIImage *refImage = UIGraphicsGetImageFromCurrentImageContext();
imageColorSpace = CGImageGetColorSpace(refImage.CGImage);
imageColorSpace = CGColorSpaceRetain(CGImageGetColorSpace(refImage.CGImage));
ASDisplayNodeCAssertNotNil(imageColorSpace, nil);
UIGraphicsEndImageContext();
});

Expand Down

0 comments on commit ef1d6f6

Please sign in to comment.