denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 1 | /* |
| 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 Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 12 | |
denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 13 | #import "RTCMTLRenderer.h" |
| 14 | |
Peter Hanspers | 1c62b98 | 2018-05-03 14:06:04 +0200 | [diff] [blame] | 15 | #define MTL_STRINGIFY(s) @ #s |
| 16 | |
denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 17 | NS_ASSUME_NONNULL_BEGIN |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 18 | |
denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 19 | @interface RTCMTLRenderer (Private) |
| 20 | - (nullable id<MTLDevice>)currentMetalDevice; |
| 21 | - (NSString *)shaderSource; |
| 22 | - (BOOL)setupTexturesForFrame:(nonnull RTCVideoFrame *)frame; |
| 23 | - (void)uploadTexturesToRenderEncoder:(id<MTLRenderCommandEncoder>)renderEncoder; |
Peter Hanspers | 7af087a | 2018-06-12 14:14:48 +0200 | [diff] [blame] | 24 | - (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; |
denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 31 | @end |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 32 | |
denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 33 | NS_ASSUME_NONNULL_END |