xref: /aosp_15_r20/external/webrtc/sdk/objc/components/renderer/metal/RTCMTLRenderer+Private.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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>
12 
13 #import "RTCMTLRenderer.h"
14 
15 #define MTL_STRINGIFY(s) @ #s
16 
17 NS_ASSUME_NONNULL_BEGIN
18 
19 @interface RTCMTLRenderer (Private)
20 - (nullable id<MTLDevice>)currentMetalDevice;
21 - (NSString *)shaderSource;
22 - (BOOL)setupTexturesForFrame:(nonnull RTC_OBJC_TYPE(RTCVideoFrame) *)frame;
23 - (void)uploadTexturesToRenderEncoder:(id<MTLRenderCommandEncoder>)renderEncoder;
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 RTC_OBJC_TYPE(RTCVideoFrame) *)frame;
31 @end
32 
33 NS_ASSUME_NONNULL_END
34