From 28e582d55af51a230f90eabeb49ab9fde2123c46 Mon Sep 17 00:00:00 2001 From: Jake Bromberg Date: Tue, 22 Jun 2021 11:34:29 -0700 Subject: [PATCH] Removing RTC_SUPPORTS_METAL compilation flag. This flag is a holdover from before either macOS or the iOS Simulator supported Metal rendering. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:12638 Change-Id: I21054bdcf4c941086234562c4ee1740754050590 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216700 Reviewed-by: Mirko Bonadei Reviewed-by: Kári Helgason Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#34362} --- BUILD.gn | 4 ---- examples/BUILD.gn | 5 ++--- examples/objc/AppRTCMobile/ios/ARDVideoCallView.m | 12 +----------- examples/objcnativeapi/objc/NADViewController.mm | 9 +-------- webrtc.gni | 3 --- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 7c89521bb1..bc51df7c07 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -435,10 +435,6 @@ config("common_config") { config("common_objc") { frameworks = [ "Foundation.framework" ] - - if (rtc_use_metal_rendering) { - defines = [ "RTC_SUPPORTS_METAL" ] - } } if (!build_with_chromium) { diff --git a/examples/BUILD.gn b/examples/BUILD.gn index 2f1277c744..e0e11ae641 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -342,15 +342,13 @@ if (is_ios || (is_mac && target_cpu != "x86")) { "../sdk:base_objc", "../sdk:helpers_objc", "../sdk:mediaconstraints_objc", + "../sdk:metal_objc", "../sdk:peerconnectionfactory_base_objc", "../sdk:peerconnectionfactory_base_objc", "../sdk:ui_objc", "../sdk:videocapture_objc", "../sdk:videocodec_objc", ] - if (rtc_use_metal_rendering) { - deps += [ "../sdk:metal_objc" ] - } frameworks = [ "AVFoundation.framework" ] } @@ -499,6 +497,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { "../sdk:base_objc", "../sdk:default_codec_factory_objc", "../sdk:helpers_objc", + "../sdk:metal_objc", "../sdk:native_api", "../sdk:ui_objc", "../sdk:videocapture_objc", diff --git a/examples/objc/AppRTCMobile/ios/ARDVideoCallView.m b/examples/objc/AppRTCMobile/ios/ARDVideoCallView.m index 4301b7ede9..437aea8d56 100644 --- a/examples/objc/AppRTCMobile/ios/ARDVideoCallView.m +++ b/examples/objc/AppRTCMobile/ios/ARDVideoCallView.m @@ -12,10 +12,7 @@ #import -#import "sdk/objc/components/renderer/opengl/RTCEAGLVideoView.h" -#if defined(RTC_SUPPORTS_METAL) -#import "sdk/objc/components/renderer/metal/RTCMTLVideoView.h" // nogncheck -#endif +#import "sdk/objc/components/renderer/metal/RTCMTLVideoView.h" #import "UIImage+ARDUtilities.h" @@ -44,14 +41,7 @@ static CGFloat const kStatusBarHeight = 20; - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { -#if defined(RTC_SUPPORTS_METAL) _remoteVideoView = [[RTC_OBJC_TYPE(RTCMTLVideoView) alloc] initWithFrame:CGRectZero]; -#else - RTC_OBJC_TYPE(RTCEAGLVideoView) *remoteView = - [[RTC_OBJC_TYPE(RTCEAGLVideoView) alloc] initWithFrame:CGRectZero]; - remoteView.delegate = self; - _remoteVideoView = remoteView; -#endif [self addSubview:_remoteVideoView]; diff --git a/examples/objcnativeapi/objc/NADViewController.mm b/examples/objcnativeapi/objc/NADViewController.mm index 7f6ffbb7e5..fd244799f8 100644 --- a/examples/objcnativeapi/objc/NADViewController.mm +++ b/examples/objcnativeapi/objc/NADViewController.mm @@ -12,10 +12,7 @@ #import "sdk/objc/base/RTCVideoRenderer.h" #import "sdk/objc/components/capturer/RTCCameraVideoCapturer.h" -#if defined(RTC_SUPPORTS_METAL) -#import "sdk/objc/components/renderer/metal/RTCMTLVideoView.h" // nogncheck -#endif -#import "sdk/objc/components/renderer/opengl/RTCEAGLVideoView.h" +#import "sdk/objc/components/renderer/metal/RTCMTLVideoView.h" #import "sdk/objc/helpers/RTCCameraPreviewView.h" #include @@ -49,11 +46,7 @@ - (void)loadView { _view = [[UIView alloc] initWithFrame:CGRectZero]; -#if defined(RTC_SUPPORTS_METAL) _remoteVideoView = [[RTC_OBJC_TYPE(RTCMTLVideoView) alloc] initWithFrame:CGRectZero]; -#else - _remoteVideoView = [[RTC_OBJC_TYPE(RTCEAGLVideoView) alloc] initWithFrame:CGRectZero]; -#endif _remoteVideoView.translatesAutoresizingMaskIntoConstraints = NO; [_view addSubview:_remoteVideoView]; diff --git a/webrtc.gni b/webrtc.gni index 559078db34..13308ac440 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -183,9 +183,6 @@ declare_args() { rtc_apprtcmobile_broadcast_extension = false } - # Determines whether Metal is available on iOS/macOS. - rtc_use_metal_rendering = is_mac || (is_ios && current_cpu == "arm64") - # When set to false, builtin audio encoder/decoder factories and all the # audio codecs they depend on will not be included in libwebrtc.{a|lib} # (they will still be included in libjingle_peerconnection_so.so and