mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 01:55:19 -04:00
specify to skip alpha when drawing launcher on OSX
This saves 1-3 ms on average when redrawing launcher at maximised size
This commit is contained in:
parent
4fa5c10046
commit
0503f354de
@ -2234,7 +2234,7 @@ void Window_DrawFramebuffer(Rect2D r) {
|
||||
provider = CGDataProviderCreateWithData(NULL, fb_bmp.Scan0,
|
||||
Bitmap_DataSize(fb_bmp.Width, fb_bmp.Height), NULL);
|
||||
image = CGImageCreate(fb_bmp.Width, fb_bmp.Height, 8, 32, fb_bmp.Width * 4, colorSpace,
|
||||
kCGBitmapByteOrder32Little | kCGImageAlphaFirst, provider, NULL, 0, 0);
|
||||
kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, provider, NULL, 0, 0);
|
||||
|
||||
CGContextDrawImage(context, rect, image);
|
||||
CGContextSynchronize(context);
|
||||
@ -2308,6 +2308,7 @@ static void GLContext_UnsetFullscreen(void) {
|
||||
GLContext_SetDrawable();
|
||||
|
||||
win_fullscreen = false;
|
||||
/* TODO: Eliminate this if possible */
|
||||
Window_SetSize(ctx_windowWidth, ctx_windowHeight);
|
||||
}
|
||||
|
||||
@ -2326,6 +2327,7 @@ static void GLContext_SetFullscreen(void) {
|
||||
/* This is a weird hack to workaround a bug where the first time a context */
|
||||
/* is made fullscreen, we just end up with a blank screen. So we undo it as fullscreen */
|
||||
/* and redo it as fullscreen. */
|
||||
/* TODO: We really should'd need to do this. Need to debug on real hardware. */
|
||||
if (!ctx_firstFullscreen) {
|
||||
ctx_firstFullscreen = true;
|
||||
GLContext_UnsetFullscreen();
|
||||
@ -3873,7 +3875,7 @@ void Window_DrawFramebuffer(Rect2D r) {
|
||||
provider = CGDataProviderCreateWithData(NULL, fb_bmp.Scan0,
|
||||
Bitmap_DataSize(fb_bmp.Width, fb_bmp.Height), NULL);
|
||||
image = CGImageCreate(fb_bmp.Width, fb_bmp.Height, 8, 32, fb_bmp.Width * 4, colorSpace,
|
||||
kCGBitmapByteOrder32Little | kCGImageAlphaFirst, provider, NULL, 0, 0);
|
||||
kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, provider, NULL, 0, 0);
|
||||
|
||||
CGContextDrawImage(context, rect, image);
|
||||
CGContextSynchronize(context);
|
||||
|
Loading…
x
Reference in New Issue
Block a user