| OLD | NEW |
| 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 "RTCMTLRenderer+Private.h" | 11 #import "RTCMTLRenderer+Private.h" |
| 12 | 12 |
| 13 #import <Metal/Metal.h> | 13 #import <Metal/Metal.h> |
| 14 #import <MetalKit/MetalKit.h> | 14 #import <MetalKit/MetalKit.h> |
| 15 | 15 |
| 16 #import "WebRTC/RTCLogging.h" | 16 #import "WebRTC/RTCLogging.h" |
| 17 #import "WebRTC/RTCVideoFrame.h" | 17 #import "WebRTC/RTCVideoFrame.h" |
| 18 | 18 |
| 19 #include "webrtc/api/video/video_rotation.h" | 19 #include "webrtc/api/video/video_rotation.h" |
| 20 #include "webrtc/base/checks.h" | 20 #include "webrtc/rtc_base/checks.h" |
| 21 | 21 |
| 22 // As defined in shaderSource. | 22 // As defined in shaderSource. |
| 23 static NSString *const vertexFunctionName = @"vertexPassthrough"; | 23 static NSString *const vertexFunctionName = @"vertexPassthrough"; |
| 24 static NSString *const fragmentFunctionName = @"fragmentColorConversion"; | 24 static NSString *const fragmentFunctionName = @"fragmentColorConversion"; |
| 25 | 25 |
| 26 static NSString *const pipelineDescriptorLabel = @"RTCPipeline"; | 26 static NSString *const pipelineDescriptorLabel = @"RTCPipeline"; |
| 27 static NSString *const commandBufferLabel = @"RTCCommandBuffer"; | 27 static NSString *const commandBufferLabel = @"RTCCommandBuffer"; |
| 28 static NSString *const renderEncoderLabel = @"RTCEncoder"; | 28 static NSString *const renderEncoderLabel = @"RTCEncoder"; |
| 29 static NSString *const renderEncoderDebugGroup = @"RTCDrawFrame"; | 29 static NSString *const renderEncoderDebugGroup = @"RTCDrawFrame"; |
| 30 | 30 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 - (void)drawFrame:(RTCVideoFrame *)frame { | 236 - (void)drawFrame:(RTCVideoFrame *)frame { |
| 237 @autoreleasepool { | 237 @autoreleasepool { |
| 238 if ([self setupTexturesForFrame:frame]) { | 238 if ([self setupTexturesForFrame:frame]) { |
| 239 [self render]; | 239 [self render]; |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 @end | 244 @end |
| OLD | NEW |