src/video/uikit/SDL_uikitmetalview.m
changeset 12002 9116d02d3feb
parent 11918 c087b18ba812
child 12320 758d4e1222a7
equal deleted inserted replaced
12001:84c2582329b0 12002:9116d02d3feb
    47 - (instancetype)initWithFrame:(CGRect)frame
    47 - (instancetype)initWithFrame:(CGRect)frame
    48                         scale:(CGFloat)scale
    48                         scale:(CGFloat)scale
    49 {
    49 {
    50     if ((self = [super initWithFrame:frame])) {
    50     if ((self = [super initWithFrame:frame])) {
    51         self.tag = METALVIEW_TAG;
    51         self.tag = METALVIEW_TAG;
    52         /* Set the desired scale. The default drawableSize of a CAMetalLayer
    52         /* Set the desired scale. */
    53          * is its bounds x its scale so nothing further needs to be done. */
    53         ((CAMetalLayer *) self.layer).drawableSize = self.bounds.size;
    54         self.layer.contentsScale = scale;
    54         self.layer.contentsScale = scale;
    55     }
    55     }
    56 
    56 
    57     return self;
    57     return self;
    58 }
    58 }