Skip to content

Commit

Permalink
SGVideoRenderer: Use presentation size to render.
Browse files Browse the repository at this point in the history
  • Loading branch information
libobjc committed Nov 5, 2019
1 parent 9c6b2f3 commit a03e5ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SGPlayer/Classes/Core/SGRenderer/SGVideoRenderer.m
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ - (void)drawInMTKView:(MTKView *)view
if (drawableSize.width == 0 || drawableSize.height == 0) {
return;
}
MTLSize textureSize = MTLSizeMake(width, height, 0);
MTLSize textureSize = MTLSizeMake(frame.descriptor.presentationSize.num, frame.descriptor.presentationSize.den, 0);
MTLSize layerSize = MTLSizeMake(drawable.texture.width, drawable.texture.height, 0);
switch (displayMode) {
case SGDisplayModePlane: {
Expand Down

0 comments on commit a03e5ea

Please sign in to comment.