objc2_compositor_services/generated/
layer_renderer_configuration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-metal")]
7use objc2_metal::*;
8
9use crate::*;
10
11extern_class!(
12    /// An opaque type that stores the settings to apply to a Compositor layer renderer.
13    ///
14    /// You don’t create this type directly. If your ``CompositorLayer`` uses a custom
15    /// ``CompositorLayerConfiguration``, the compositor layer creates an instance of this type and
16    /// passes it to the provider’s
17    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
18    /// function. Use that instance to modify the default configuration settings
19    /// for your layer.
20    ///
21    /// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_object_cp_layer_renderer_configuration?language=objc)
22    #[unsafe(super(NSObject))]
23    #[derive(Debug, PartialEq, Eq, Hash)]
24    pub struct CP_OBJECT_cp_layer_renderer_configuration;
25);
26
27extern_conformance!(
28    unsafe impl NSObjectProtocol for CP_OBJECT_cp_layer_renderer_configuration {}
29);
30
31impl CP_OBJECT_cp_layer_renderer_configuration {
32    extern_methods!(
33        #[unsafe(method(init))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37        #[unsafe(method(new))]
38        #[unsafe(method_family = new)]
39        pub unsafe fn new() -> Retained<Self>;
40    );
41}
42
43/// An opaque type that stores the settings to apply to a Compositor layer renderer.
44///
45/// You don’t create this type directly. If your ``CompositorLayer`` uses a custom
46/// ``CompositorLayerConfiguration``, the compositor layer creates an instance of this type and
47/// passes it to the provider’s
48/// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
49/// function. Use that instance to modify the default configuration settings
50/// for your layer.
51///
52/// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_layer_renderer_configuration_t?language=objc)
53pub type cp_layer_renderer_configuration_t = CP_OBJECT_cp_layer_renderer_configuration;
54
55extern "C-unwind" {
56    /// Returns the pixel format to use for the layer’s color textures.
57    ///
58    /// - Parameters:
59    /// - configuration: The layer configuration type that contains the
60    /// information. The system passes an instance of this type to the
61    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
62    /// method of your configuration provider.
63    /// - Returns: The pixel format to use for the layer’s color textures.
64    ///
65    /// The compositor creates the color textures using the pixel format
66    /// information you provide.
67    #[cfg(feature = "objc2-metal")]
68    pub fn cp_layer_renderer_configuration_get_color_format(
69        configuration: &cp_layer_renderer_configuration_t,
70    ) -> MTLPixelFormat;
71}
72
73extern "C-unwind" {
74    /// Sets the pixel format for the layer’s color textures to the specified
75    /// value.
76    ///
77    /// - Parameters:
78    /// - configuration: The layer configuration type to modify. The system
79    /// passes an instance of this type to the
80    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
81    /// method of your configuration provider.
82    /// - color_format: The pixel format to apply to the layer’s color textures.
83    ///
84    /// Use this function to modify the configuration details for your layer. Call the
85    /// ``cp_layer_renderer_capabilities_supported_color_format`` function to determine which
86    /// pixel formats the layer’s color textures support.
87    #[cfg(feature = "objc2-metal")]
88    pub fn cp_layer_renderer_configuration_set_color_format(
89        configuration: &cp_layer_renderer_configuration_t,
90        color_format: MTLPixelFormat,
91    );
92}
93
94extern "C-unwind" {
95    /// Returns the texture usage value to apply to the layer’s color textures.
96    ///
97    /// - Parameters:
98    /// - configuration: The layer configuration type that contains the
99    /// information. The system passes an instance of this type to the
100    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
101    /// method of your configuration provider.
102    /// - Returns: The Metal texture usage value to apply to the layer’s color
103    /// textures.
104    ///
105    /// Metal optimizes texture-related operations based on the texture's usage value.
106    /// The usage value can be a combination of options. For example, a texture
107    /// might be readable and writable. For more information, see
108    /// <doc
109    /// ://com.apple.documentation/documentation/metal/mtltextureusage>.
110    #[cfg(feature = "objc2-metal")]
111    pub fn cp_layer_renderer_configuration_get_color_usage(
112        configuration: &cp_layer_renderer_configuration_t,
113    ) -> MTLTextureUsage;
114}
115
116extern "C-unwind" {
117    /// Sets the texture usage for the layer’s color textures to the specified
118    /// value.
119    ///
120    /// - Parameters:
121    /// - configuration: The layer configuration type to modify. The system
122    /// passes an instance of this type to the
123    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
124    /// method of your configuration provider.
125    /// - color_usage: The usage value to apply to the layer’s color textures.
126    ///
127    /// Use this function to modify the configuration details for your layer. Metal
128    /// optimizes texture-related operations based on the texture's usage value.
129    /// The usage value can be a combination of options. For example, a texture
130    /// might be readable and writable. For more information, see
131    /// <doc
132    /// ://com.apple.documentation/documentation/metal/mtltextureusage>.
133    #[cfg(feature = "objc2-metal")]
134    pub fn cp_layer_renderer_configuration_set_color_usage(
135        configuration: &cp_layer_renderer_configuration_t,
136        color_usage: MTLTextureUsage,
137    );
138}
139
140extern "C-unwind" {
141    /// Returns the pixel format to apply to the layer’s tracking areas textures.
142    ///
143    /// - Parameters:
144    /// - configuration: The layer configuration type that contains the
145    /// information. The system passes an instance of this type to the
146    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
147    /// method of your configuration provider.
148    /// - Returns: The pixel format to apply to the layer’s tracking areas textures.
149    ///
150    /// The compositor creates the tracking areas textures using the pixel format
151    /// information you provide.
152    #[cfg(feature = "objc2-metal")]
153    pub fn cp_layer_renderer_configuration_get_tracking_areas_format(
154        configuration: &cp_layer_renderer_configuration_t,
155    ) -> MTLPixelFormat;
156}
157
158extern "C-unwind" {
159    /// Sets the pixel format for the layer’s tracking areas textures to the specified
160    /// value.
161    ///
162    /// - Parameters:
163    /// - configuration: The layer configuration type to modify. The system
164    /// passes an instance of this type to the
165    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
166    /// method of your configuration provider.
167    /// - tracking_areas_format: The pixel format to apply to the layer’s tracking areas textures.
168    ///
169    /// Use this function to modify the configuration details for your layer. Call the
170    /// ``cp_layer_renderer_capabilities_supported_tracking_areas_format`` function to determine which
171    /// pixel formats the layer’s tracking areas textures supports.
172    #[cfg(feature = "objc2-metal")]
173    pub fn cp_layer_renderer_configuration_set_tracking_areas_format(
174        configuration: &cp_layer_renderer_configuration_t,
175        tracking_areas_format: MTLPixelFormat,
176    );
177}
178
179extern "C-unwind" {
180    /// Returns the texture usage value to apply to the layer’s tracking areas textures.
181    ///
182    /// - Parameters:
183    /// - configuration: The layer configuration type that contains the
184    /// information. The system passes an instance of this type to the
185    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
186    /// method of your configuration provider.
187    /// - Returns: The Metal texture usage value to apply to the layer’s tracking areas textures.
188    ///
189    /// Metal optimizes texture-related operations based on the texture's usage value.
190    /// The usage value can be a combination of options. For example, a texture
191    /// might be readable and writable. For more information, see
192    /// <doc
193    /// ://com.apple.documentation/documentation/metal/mtltextureusage>.
194    #[cfg(feature = "objc2-metal")]
195    pub fn cp_layer_renderer_configuration_get_tracking_areas_usage(
196        configuration: &cp_layer_renderer_configuration_t,
197    ) -> MTLTextureUsage;
198}
199
200extern "C-unwind" {
201    /// Sets the texture usage for the layer’s tracking areas textures to the specified
202    /// value.
203    ///
204    /// - Parameters:
205    /// - configuration: The layer configuration type to modify. The system
206    /// passes an instance of this type to the
207    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
208    /// method of your configuration provider.
209    /// - tracking_areas_usage: The usage value to apply to the layer’s
210    /// tracking areas textures.
211    ///
212    /// Use this function to modify the configuration details for your layer.
213    #[cfg(feature = "objc2-metal")]
214    pub fn cp_layer_renderer_configuration_set_tracking_areas_usage(
215        configuration: &cp_layer_renderer_configuration_t,
216        tracking_areas_usage: MTLTextureUsage,
217    );
218}
219
220extern "C-unwind" {
221    /// Returns the pixel format to apply to the layer’s depth textures.
222    ///
223    /// - Parameters:
224    /// - configuration: The layer configuration type that contains the
225    /// information. The system passes an instance of this type to the
226    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
227    /// method of your configuration provider.
228    /// - Returns: The pixel format to apply to the layer’s depth textures.
229    ///
230    /// The compositor creates the depth textures using the pixel format
231    /// information you provide.
232    #[cfg(feature = "objc2-metal")]
233    pub fn cp_layer_renderer_configuration_get_depth_format(
234        configuration: &cp_layer_renderer_configuration_t,
235    ) -> MTLPixelFormat;
236}
237
238extern "C-unwind" {
239    /// Sets the pixel format for the layer’s depth textures to the specified
240    /// value.
241    ///
242    /// - Parameters:
243    /// - configuration: The layer configuration type to modify. The system
244    /// passes an instance of this type to the
245    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
246    /// method of your configuration provider.
247    /// - color_format: The pixel format to apply to the layer’s depth textures.
248    ///
249    /// Use this function to modify the configuration details for your layer. Call the
250    /// ``cp_layer_renderer_capabilities_supported_depth_format`` function to determine which
251    /// pixel formats the layer’s depth textures supports.
252    #[cfg(feature = "objc2-metal")]
253    pub fn cp_layer_renderer_configuration_set_depth_format(
254        configuration: &cp_layer_renderer_configuration_t,
255        depth_format: MTLPixelFormat,
256    );
257}
258
259extern "C-unwind" {
260    /// Returns the texture usage value to apply to the layer’s depth textures.
261    ///
262    /// - Parameters:
263    /// - configuration: The layer configuration type that contains the
264    /// information. The system passes an instance of this type to the
265    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
266    /// method of your configuration provider.
267    /// - Returns: The Metal texture usage value to apply to the layer’s depth textures.
268    ///
269    /// Metal optimizes texture-related operations based on the texture's usage value.
270    /// The usage value can be a combination of options. For example, a texture
271    /// might be readable and writable. For more information, see
272    /// <doc
273    /// ://com.apple.documentation/documentation/metal/mtltextureusage>.
274    #[cfg(feature = "objc2-metal")]
275    pub fn cp_layer_renderer_configuration_get_depth_usage(
276        configuration: &cp_layer_renderer_configuration_t,
277    ) -> MTLTextureUsage;
278}
279
280extern "C-unwind" {
281    /// Sets the texture usage for the layer’s depth textures to the specified
282    /// value.
283    ///
284    /// - Parameters:
285    /// - configuration: The layer configuration type to modify. The system
286    /// passes an instance of this type to the
287    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
288    /// method of your configuration provider.
289    /// - depth_usage: The usage value to apply to the layer’s depth
290    /// textures.
291    ///
292    /// Use this function to modify the configuration details for your layer.
293    #[cfg(feature = "objc2-metal")]
294    pub fn cp_layer_renderer_configuration_set_depth_usage(
295        configuration: &cp_layer_renderer_configuration_t,
296        depth_usage: MTLTextureUsage,
297    );
298}
299
300extern "C-unwind" {
301    /// Returns a Boolean value that indicates whether the layer supports
302    /// variable rasterization rates.
303    ///
304    /// - Parameters:
305    /// - configuration: The layer configuration type that contains the
306    /// information. The system passes an instance of this type to the
307    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
308    /// method of your configuration provider.
309    /// - Returns: `true` if the layer supports variable rasterization rates,
310    /// or `false` if it doesn’t.
311    ///
312    /// Foveation support lets you reduce the amount of high-resolution drawing
313    /// you do. When foveation is enabled, the drawable resource for each frame
314    /// reduces the size of the texture you use for rendering. The drawable also
315    /// provides rasterization rate maps that specify the amount of rasterization
316    /// to apply to different parts of the texture. When rendering your scene,
317    /// the GPU generates fewer pixels in areas with low rasterization
318    /// rates, and then scales up those areas before displaying them onscreen.
319    pub fn cp_layer_renderer_configuration_get_foveation_enabled(
320        configuration: &cp_layer_renderer_configuration_t,
321    ) -> bool;
322}
323
324extern "C-unwind" {
325    /// Changes the setting that indicates whether the layer supports variable
326    /// rasterization rates.
327    ///
328    /// - Parameters:
329    /// - configuration: The layer configuration type to modify. The system
330    /// passes an instance of this type to the
331    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
332    /// method of your configuration provider.
333    /// - foveation_enabled: `true` to enable variable rasterization rates in
334    /// the layer, or `false` to render everything at the same resolution.
335    ///
336    /// Foveation support lets you reduce the amount of high-resolution drawing
337    /// you do. If you enable foveation, the drawable resource for each frame
338    /// reduces the size of the texture you use for rendering. The drawable also
339    /// provides rasterization rate maps that specify the amount of rasterization
340    /// to apply to different parts of the texture. When rendering your scene,
341    /// the GPU generates fewer pixels in areas with low rasterization
342    /// rates, and then scales up those areas before displaying them onscreen.
343    pub fn cp_layer_renderer_configuration_set_foveation_enabled(
344        configuration: &cp_layer_renderer_configuration_t,
345        foveation_enabled: bool,
346    );
347}
348
349extern "C-unwind" {
350    /// Returns a Boolean value that indicates whether the layer provides
351    /// flipped variable rasterization rate maps in addition to the regular maps.
352    ///
353    /// - Parameters:
354    /// - configuration: The layer configuration type that contains the
355    /// information. The system passes an instance of this type to the
356    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
357    /// method of your configuration provider.
358    /// - Returns: `true` if the layer generates flipped variable rasterization rate maps,
359    /// or `false` if it doesn’t.
360    ///
361    /// Flipped is defined as +Y = up for clip/normalized device coordinates (flipped from Metal convention).
362    /// Generating flipped rasterization rate maps requires the configuration to have foveation enabled.
363    /// Can only be used for intermediatry render passes, the final render pass of the drawable cannot
364    /// be flipped and must use +Y = down for clip/normalized device coordinates (Metal conventions).
365    /// Generating flipped maps will bring additional computational cost to your render loop, regardless
366    /// of if the map is accessed/used.
367    ///
368    /// When `true` the `cp_drawable_t` will provide flipped variable rasterization rate maps via the
369    /// `cp_drawable_get_flipped_rasterization_rate_map` function.
370    pub fn cp_layer_renderer_configuration_get_generate_flipped_rasterization_rate_maps(
371        configuration: &cp_layer_renderer_configuration_t,
372    ) -> bool;
373}
374
375extern "C-unwind" {
376    /// Changes the setting that indicates whether the layer provides
377    /// flipped variable rasterization rate maps in addition to the regular maps.
378    ///
379    /// - Parameters:
380    /// - configuration: The layer configuration type to modify. The system
381    /// passes an instance of this type to the
382    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
383    /// method of your configuration provider.
384    /// - generate_flipped_rasterization_rate_maps: `true` to generate flipped variable rasterization rate maps in
385    /// the layer, or `false` to only generate regular variable rasterization rate maps.
386    ///
387    /// Flipped is defined as +Y = up for clip/normalized device coordinates (flipped from Metal convention).
388    /// Generating flipped rasterization rate maps requires the configuration to have foveation enabled.
389    /// Can only be used for intermediatry render passes, the final render pass of the drawable cannot
390    /// be flipped and must use +Y = down for clip/normalized device coordinates (Metal conventions).
391    /// Generating flipped maps will bring additional computational cost to your render loop, regardless
392    /// of if the map is accessed/used.
393    ///
394    /// When `true` the `cp_drawable_t` will provide flipped variable rasterization rate maps via the
395    /// `cp_drawable_get_flipped_rasterization_rate_map` function.
396    pub fn cp_layer_renderer_configuration_set_generate_flipped_rasterization_rate_maps(
397        configuration: &cp_layer_renderer_configuration_t,
398        generate_flipped_rasterization_rate_maps: bool,
399    );
400}
401
402extern "C-unwind" {
403    /// Returns the texture configuration for the drawable views in the layer.
404    ///
405    /// - Parameters:
406    /// - configuration: The layer configuration type that contains the
407    /// information. The system passes an instance of this type to the
408    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
409    /// method of your configuration provider.
410    /// - Returns: The layout configuration for the textures.
411    ///
412    /// Layouts define how the compositor creates the color and depth textures
413    /// it passes to your app. A layout might use separate textures for each view,
414    /// or combine the content from multiple views into a single texture. The layout
415    /// type also determines which Metal texture type the compositor creates for you.
416    /// For more information about the supported layouts, see ``cp_layer_renderer_layout``.
417    #[cfg(feature = "layer_renderer_layout")]
418    pub fn cp_layer_renderer_configuration_get_layout(
419        configuration: &cp_layer_renderer_configuration_t,
420    ) -> cp_layer_renderer_layout;
421}
422
423extern "C-unwind" {
424    /// Changes the layout configuration for the drawable views in the layer.
425    ///
426    /// - Parameters:
427    /// - configuration: The layer configuration type to modify. The system
428    /// passes an instance of this type to the
429    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
430    /// method of your configuration provider.
431    /// - layout: The layout configuration to apply to the layer.
432    ///
433    /// Layouts define how the compositor creates the textures it passes to your
434    /// app. Use this function to change the layout you use for your content. A
435    /// layout might use separate textures for each view, or combine the content
436    /// from multiple views into a single texture. The layout type also determines
437    /// which Metal texture type the compositor creates for you. For more
438    /// information about the supported layouts, see ``cp_layer_renderer_layout``.
439    #[cfg(feature = "layer_renderer_layout")]
440    pub fn cp_layer_renderer_configuration_set_layout(
441        configuration: &cp_layer_renderer_configuration_t,
442        layout: cp_layer_renderer_layout,
443    );
444}
445
446extern "C-unwind" {
447    /// Sets the pixel format for the drawable's render context stencil textures to the specified
448    /// value.
449    ///
450    /// - Parameters:
451    /// - configuration: The layer configuration type to modify. The system
452    /// passes an instance of this type to the
453    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
454    /// method of your configuration provider.
455    /// - stencil_format: The pixel format to apply to the drawable's render context stencil
456    /// textures.
457    #[cfg(feature = "objc2-metal")]
458    pub fn cp_layer_renderer_configuration_set_drawable_render_context_stencil_format(
459        configuration: &cp_layer_renderer_configuration_t,
460        stencil_format: MTLPixelFormat,
461    );
462}
463
464extern "C-unwind" {
465    /// Returns the pixel format to use for the stencil texture in drawable's render context.
466    ///
467    /// - Parameters:
468    /// - configuration: The layer configuration type that contains the
469    /// information. The system passes an instance of this type to the
470    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
471    /// method of your configuration provider.
472    /// - Returns: The pixel format to use for the drawable's render context stencil textures.
473    #[cfg(feature = "objc2-metal")]
474    pub fn cp_layer_renderer_configuration_get_drawable_render_context_stencil_format(
475        configuration: &cp_layer_renderer_configuration_t,
476    ) -> MTLPixelFormat;
477}
478
479extern "C-unwind" {
480    /// Returns the raster sample count to use in drawable's render context.
481    ///
482    /// - Parameters:
483    /// - configuration: The layer configuration type that contains the
484    /// information. The system passes an instance of this type to the
485    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
486    /// method of your configuration provider.
487    /// - Returns: The raster sample count to use for the drawable's render context.
488    pub fn cp_layer_renderer_configuration_get_drawable_render_context_raster_sample_count(
489        configuration: &cp_layer_renderer_configuration_t,
490    ) -> c_int;
491}
492
493extern "C-unwind" {
494    /// Sets the raster sample count for the drawable's render context to the specified
495    /// value.
496    ///
497    /// - Parameters:
498    /// - configuration: The layer configuration type to modify. The system
499    /// passes an instance of this type to the
500    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
501    /// method of your configuration provider.
502    /// - raster_sample_count: The raster sample count to apply to the drawable's render context.
503    pub fn cp_layer_renderer_configuration_set_drawable_render_context_raster_sample_count(
504        configuration: &cp_layer_renderer_configuration_t,
505        raster_sample_count: c_int,
506    );
507}
508
509extern "C-unwind" {
510    /// Get max render quality the layer can use when drawing to the drawables.
511    ///
512    /// - Parameters:
513    /// - configuration: The layer configuration type to modify. The system
514    /// passes an instance of this type to the
515    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
516    /// method of your configuration provider.
517    /// - Returns: The max render qualityto use for the drawable's.
518    ///
519    /// The max render quality is a value between [0, 1].
520    /// This determines the max render quality at which drawing can happen.
521    ///
522    /// Setting a higher max render quality will impact the resolution that is allocated for the drawable textures.
523    /// This memory will count against the app's memory limit so should only be specified as high as renderer
524    /// can reasonably achieve frame rate at. During runtime, the render quality can be changed on the
525    /// layer renderer but will not impact memory usage, see ``cp_layer_renderer_set_render_quality``.
526    #[cfg(feature = "cp_types")]
527    pub fn cp_layer_renderer_configuration_get_max_render_quality(
528        configuration: &cp_layer_renderer_configuration_t,
529    ) -> cp_render_quality_t;
530}
531
532extern "C-unwind" {
533    /// Set max render quality the layer can use when drawing to the drawables.
534    ///
535    /// - Parameters:
536    /// - configuration: The layer configuration type to modify. The system
537    /// passes an instance of this type to the
538    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
539    /// method of your configuration provider.
540    /// - render_quality: A value between between [0, 1].
541    /// This determines the max render quality at which drawing can happen.
542    ///
543    /// Setting a higher max render quality will impact the resolution that is allocated for the drawable textures.
544    /// This memory will count against the app's memory limit so should only be specified as high as renderer
545    /// can reasonably achieve frame rate at. During runtime, the render quality can be changed on the
546    /// layer renderer but will not impact memory usage, see ``cp_layer_renderer_set_render_quality``.
547    #[cfg(feature = "cp_types")]
548    pub fn cp_layer_renderer_configuration_set_max_render_quality(
549        configuration: &cp_layer_renderer_configuration_t,
550        render_quality: cp_render_quality_t,
551    );
552}
553
554extern "C-unwind" {
555    /// Get whether the layer can use Metal4 when drawing to the drawables.
556    ///
557    /// - Parameters:
558    /// - configuration: The layer configuration type to modify. The system
559    /// passes an instance of this type to the
560    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
561    /// method of your configuration provider.
562    /// - Returns: Whether the layer supports using Metal4, otherwise defaults to Metal3.
563    pub fn cp_layer_renderer_configuration_get_supports_mtl4(
564        configuration: &cp_layer_renderer_configuration_t,
565    ) -> bool;
566}
567
568extern "C-unwind" {
569    /// Set whether the layer can use Metal4 when drawing to the drawables.
570    ///
571    /// - Parameters:
572    /// - configuration: The layer configuration type to modify. The system
573    /// passes an instance of this type to the
574    /// ``CompositorLayerConfiguration/makeConfiguration(capabilities:configuration:)``
575    /// method of your configuration provider.
576    /// - supports_mtl4: Whether the layer supports using Metal4, otherwise defaults to Metal3.
577    pub fn cp_layer_renderer_configuration_set_supports_mtl4(
578        configuration: &cp_layer_renderer_configuration_t,
579        supports_mtl4: bool,
580    );
581}