Metal rendering should account for cropping.

Also:
- added a rotation override to allow ignoring frame rotation
- fixed a couple of minor issues
- made it possible to run the MTKView without the DisplayLink

Bug: webrtc:9301
Change-Id: Ia83c152d9b6d45d56ceb80d287b5d3eacfaebddd
Reviewed-on: https://webrtc-review.googlesource.com/78282
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23452}
This commit is contained in:
Peter Hanspers
2018-05-23 16:30:00 +02:00
committed by Commit Bot
parent 942b360d82
commit fc4a9c9333
8 changed files with 268 additions and 98 deletions

View File

@ -43,7 +43,9 @@ static CGFloat const kStatusBarHeight = 20;
if (self = [super initWithFrame:frame]) {
#if defined(RTC_SUPPORTS_METAL)
_remoteVideoView = [[RTCMTLVideoView alloc] initWithFrame:CGRectZero];
RTCMTLVideoView *metalView = [[RTCMTLVideoView alloc] initWithFrame:CGRectZero];
metalView.useDisplayLink = NO;
_remoteVideoView = metalView;
#else
RTCEAGLVideoView *remoteView = [[RTCEAGLVideoView alloc] initWithFrame:CGRectZero];
remoteView.delegate = self;