blob: f442886b7921bd2cabf25757d40a883166505ca6 [file] [log] [blame]
denicijad2088152017-04-28 02:14:54 -07001/*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#import <Metal/Metal.h>
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020012
denicijad2088152017-04-28 02:14:54 -070013#import "RTCMTLRenderer.h"
14
Peter Hanspers1c62b982018-05-03 14:06:04 +020015#define MTL_STRINGIFY(s) @ #s
16
denicijad2088152017-04-28 02:14:54 -070017NS_ASSUME_NONNULL_BEGIN
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020018
denicijad2088152017-04-28 02:14:54 -070019@interface RTCMTLRenderer (Private)
20- (nullable id<MTLDevice>)currentMetalDevice;
21- (NSString *)shaderSource;
22- (BOOL)setupTexturesForFrame:(nonnull RTCVideoFrame *)frame;
23- (void)uploadTexturesToRenderEncoder:(id<MTLRenderCommandEncoder>)renderEncoder;
Peter Hanspers7af087a2018-06-12 14:14:48 +020024- (void)getWidth:(nonnull int *)width
25 height:(nonnull int *)height
26 cropWidth:(nonnull int *)cropWidth
27 cropHeight:(nonnull int *)cropHeight
28 cropX:(nonnull int *)cropX
29 cropY:(nonnull int *)cropY
30 ofFrame:(nonnull RTCVideoFrame *)frame;
denicijad2088152017-04-28 02:14:54 -070031@end
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020032
denicijad2088152017-04-28 02:14:54 -070033NS_ASSUME_NONNULL_END