Add renderer-agnostic delegate protocol.

The MTL renderer should also have a way to notify it's delegate
that it's content size changed.

The plan is to introduce this new protocol, move existing clients over
to implementing it in favour of RTCEAGLVideoViewDelegate, and then finally
removing the old protocol.

Bug: b/73147161
Change-Id: I908d7b2667e44e02a58066d701a48efec0e98d14
Reviewed-on: https://webrtc-review.googlesource.com/70243
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22944}
This commit is contained in:
Kári Tristan Helgason
2018-04-19 17:38:05 +02:00
committed by Commit Bot
parent 9fd6b98f44
commit 06d094f3e6
9 changed files with 43 additions and 17 deletions

View File

@ -20,15 +20,13 @@
NS_ASSUME_NONNULL_BEGIN
@class RTCNSGLVideoView;
@protocol RTCNSGLVideoViewDelegate
- (void)videoView:(RTCNSGLVideoView *)videoView didChangeVideoSize:(CGSize)size;
@protocol RTCNSGLVideoViewDelegate<RTCVideoViewDelegate>
@end
@interface RTCNSGLVideoView : NSOpenGLView <RTCVideoRenderer>
@property(nonatomic, weak) id<RTCNSGLVideoViewDelegate> delegate;
@property(nonatomic, weak) id<RTCVideoViewDelegate> delegate;
- (instancetype)initWithFrame:(NSRect)frameRect
pixelFormat:(NSOpenGLPixelFormat *)format