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