File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1010#import " MGLLayer.h"
1111
1212#import < QuartzCore/CAMetalLayer.h>
13+ #import < QuartzCore/QuartzCore.h>
1314
1415#include < EGL/egl.h>
1516#include < GLES2/gl2.h>
Original file line number Diff line number Diff line change @@ -680,10 +680,14 @@ - (void)checkLayerSize
680680 if (rx::IsMetalDisplayAvailable ())
681681 {
682682 // Resize the metal layer
683+ [CATransaction begin ];
684+ [CATransaction setValue: (id )kCFBooleanTrue
685+ forKey: kCATransactionDisableActions ];
683686 _metalLayer.frame = self.bounds ;
684687 _metalLayer.drawableSize =
685688 CGSizeMake (_metalLayer.bounds .size .width * _metalLayer.contentsScale ,
686689 _metalLayer.bounds .size .height * _metalLayer.contentsScale );
690+ [CATransaction commit ];
687691 }
688692 else
689693 {
You can’t perform that action at this time.
0 commit comments