Chromium Code Reviews

Side by Side Diff: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMTLVideoView.h

Issue 2722583002: Add Metal video view in AppRTCMobile and metal availability macro. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #import <Foundation/Foundation.h> 11 #import <Foundation/Foundation.h>
12 12
13 #import "WebRTC/RTCVideoRenderer.h" 13 #import "WebRTC/RTCVideoRenderer.h"
14 14
15 RTC_EXPORT
kthelgason 2017/02/28 10:03:10 This should be right before the exported symbol, i
16
17 // Check if metal is supported in WebRTC.
18 // NOTE: Currently __arm64__ == Metal.
19 #if defined(__arm64__) && __arm64__
20 #define RTC_SUPPORTS_METAL 1
21 #else
22 #define RTC_SUPPORTS_METAL 0
23 #endif
kthelgason 2017/02/28 10:03:10 I'd want to set this in gn if possible. Are there
daniela-webrtc 2017/02/28 14:27:12 This is intended for the consumers of the API, to
24
15 NS_ASSUME_NONNULL_BEGIN 25 NS_ASSUME_NONNULL_BEGIN
16 RTC_EXPORT
17 26
18 /** 27 /**
19 * RTCMTLVideoView is thin wrapper around MTKView. 28 * RTCMTLVideoView is thin wrapper around MTKView.
20 * 29 *
21 * It has id<RTCVideoRenderer> property that renders video frames in the view's 30 * It has id<RTCVideoRenderer> property that renders video frames in the view's
22 * bounds using Metal. 31 * bounds using Metal.
23 */ 32 */
24 NS_CLASS_AVAILABLE_IOS(9) 33 NS_CLASS_AVAILABLE_IOS(9)
25 @interface RTCMTLVideoView : UIView <RTCVideoRenderer> 34 @interface RTCMTLVideoView : UIView <RTCVideoRenderer>
26 35
27 @end 36 @end
28 NS_ASSUME_NONNULL_END 37 NS_ASSUME_NONNULL_END
OLDNEW

Powered by Google App Engine