1#[doc = ""]
2#[doc = "The aim of this color management extension is to get HDR games working quickly,"]
3#[doc = "and have an easy way to test implementations in the wild before the upstream"]
4#[doc = "protocol is ready to be merged."]
5#[doc = "For that purpose it's intentionally limited and cut down and does not serve"]
6#[doc = "all uses cases."]
7#[doc = ""]
8#[allow(clippy::module_inception)]
9pub mod frog_color_management_v1 {
10 #[doc = ""]
11 #[doc = "The color management factory singleton creates color managed surface objects."]
12 #[doc = ""]
13 #[allow(clippy::too_many_arguments)]
14 pub mod frog_color_management_factory_v1 {
15 #[allow(unused)]
16 use futures_util::SinkExt;
17 #[allow(unused)]
18 use std::os::fd::AsRawFd;
19 #[doc = "Trait to implement the frog_color_management_factory_v1 interface. See the module level documentation for more info"]
20 pub trait FrogColorManagementFactoryV1: crate::server::Dispatcher {
21 const INTERFACE: &'static str = "frog_color_management_factory_v1";
22 const VERSION: u32 = 1u32;
23 fn handle_request(
24 &self,
25 client: &mut crate::server::Client,
26 sender_id: crate::wire::ObjectId,
27 message: &mut crate::wire::Message,
28 ) -> impl Future<Output = crate::server::Result<()>> + Send {
29 async move {
30 #[allow(clippy::match_single_binding)]
31 match message.opcode() {
32 0u16 => {
33 tracing::debug!(
34 "frog_color_management_factory_v1#{}.destroy()",
35 sender_id,
36 );
37 let result = self.destroy(client, sender_id).await;
38 client.remove(sender_id);
39 result
40 }
41 1u16 => {
42 let surface = message
43 .object()?
44 .ok_or(crate::wire::DecodeError::MalformedPayload)?;
45 let callback = message
46 .object()?
47 .ok_or(crate::wire::DecodeError::MalformedPayload)?;
48 tracing::debug!(
49 "frog_color_management_factory_v1#{}.get_color_managed_surface({}, {})",
50 sender_id,
51 surface,
52 callback
53 );
54 self.get_color_managed_surface(client, sender_id, surface, callback)
55 .await
56 }
57 opcode => Err(crate::server::error::Error::UnknownOpcode(opcode)),
58 }
59 }
60 }
61 fn destroy(
62 &self,
63 client: &mut crate::server::Client,
64 sender_id: crate::wire::ObjectId,
65 ) -> impl Future<Output = crate::server::Result<()>> + Send;
66 #[doc = ""]
67 #[doc = ""]
68 fn get_color_managed_surface(
69 &self,
70 client: &mut crate::server::Client,
71 sender_id: crate::wire::ObjectId,
72 surface: crate::wire::ObjectId,
73 callback: crate::wire::ObjectId,
74 ) -> impl Future<Output = crate::server::Result<()>> + Send;
75 }
76 }
77 #[doc = ""]
78 #[doc = "Interface for changing surface color management and HDR state."]
79 #[doc = ""]
80 #[doc = "An implementation must: support every part of the version"]
81 #[doc = "of the frog_color_managed_surface interface it exposes."]
82 #[doc = "Including all known enums associated with a given version."]
83 #[doc = ""]
84 #[allow(clippy::too_many_arguments)]
85 pub mod frog_color_managed_surface {
86 #[allow(unused)]
87 use futures_util::SinkExt;
88 #[allow(unused)]
89 use std::os::fd::AsRawFd;
90 #[doc = ""]
91 #[doc = "Extended information on the transfer functions described"]
92 #[doc = "here can be found in the Khronos Data Format specification:"]
93 #[doc = ""]
94 #[doc = "https://registry.khronos.org/DataFormat/specs/1.3/dataformat.1.3.html"]
95 #[doc = ""]
96 #[repr(u32)]
97 #[non_exhaustive]
98 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
99 pub enum TransferFunction {
100 #[doc = "specifies undefined, implementation-specific handling of the surface's transfer function."]
101 Undefined = 0u32,
102 #[doc = "specifies the sRGB non-linear EOTF. An implementation may: display this as Gamma 2.2 for the purposes of being consistent with content rendering across displays, rendering_intent and user expectations."]
103 Srgb = 1u32,
104 #[doc = "specifies gamma 2.2 power curve as the EOTF"]
105 Gamma22 = 2u32,
106 #[doc = "specifies the SMPTE ST2084 Perceptual Quantizer (PQ) EOTF"]
107 St2084Pq = 3u32,
108 #[doc = "specifies the scRGB (extended sRGB) linear EOTF. Note: Primaries outside the gamut triangle specified can be expressed with negative values for this transfer function."]
109 ScrgbLinear = 4u32,
110 }
111 impl TryFrom<u32> for TransferFunction {
112 type Error = crate::wire::DecodeError;
113 fn try_from(v: u32) -> Result<Self, Self::Error> {
114 match v {
115 0u32 => Ok(Self::Undefined),
116 1u32 => Ok(Self::Srgb),
117 2u32 => Ok(Self::Gamma22),
118 3u32 => Ok(Self::St2084Pq),
119 4u32 => Ok(Self::ScrgbLinear),
120 _ => Err(crate::wire::DecodeError::MalformedPayload),
121 }
122 }
123 }
124 impl std::fmt::Display for TransferFunction {
125 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
126 (*self as u32).fmt(f)
127 }
128 }
129 #[repr(u32)]
130 #[non_exhaustive]
131 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
132 pub enum Primaries {
133 #[doc = "specifies undefined, implementation-specific handling"]
134 Undefined = 0u32,
135 #[doc = "specifies Rec.709/sRGB primaries with D65 white point"]
136 Rec709 = 1u32,
137 #[doc = "specifies Rec.2020/HDR10 primaries with D65 white point"]
138 Rec2020 = 2u32,
139 }
140 impl TryFrom<u32> for Primaries {
141 type Error = crate::wire::DecodeError;
142 fn try_from(v: u32) -> Result<Self, Self::Error> {
143 match v {
144 0u32 => Ok(Self::Undefined),
145 1u32 => Ok(Self::Rec709),
146 2u32 => Ok(Self::Rec2020),
147 _ => Err(crate::wire::DecodeError::MalformedPayload),
148 }
149 }
150 }
151 impl std::fmt::Display for Primaries {
152 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
153 (*self as u32).fmt(f)
154 }
155 }
156 #[doc = ""]
157 #[doc = "Extended information on render intents described"]
158 #[doc = "here can be found in ICC.1:2022:"]
159 #[doc = ""]
160 #[doc = "https://www.color.org/specification/ICC.1-2022-05.pdf"]
161 #[doc = ""]
162 #[repr(u32)]
163 #[non_exhaustive]
164 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
165 pub enum RenderIntent {
166 #[doc = "perceptual"]
167 Perceptual = 0u32,
168 }
169 impl TryFrom<u32> for RenderIntent {
170 type Error = crate::wire::DecodeError;
171 fn try_from(v: u32) -> Result<Self, Self::Error> {
172 match v {
173 0u32 => Ok(Self::Perceptual),
174 _ => Err(crate::wire::DecodeError::MalformedPayload),
175 }
176 }
177 }
178 impl std::fmt::Display for RenderIntent {
179 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
180 (*self as u32).fmt(f)
181 }
182 }
183 #[doc = "Trait to implement the frog_color_managed_surface interface. See the module level documentation for more info"]
184 pub trait FrogColorManagedSurface: crate::server::Dispatcher {
185 const INTERFACE: &'static str = "frog_color_managed_surface";
186 const VERSION: u32 = 1u32;
187 fn handle_request(
188 &self,
189 client: &mut crate::server::Client,
190 sender_id: crate::wire::ObjectId,
191 message: &mut crate::wire::Message,
192 ) -> impl Future<Output = crate::server::Result<()>> + Send {
193 async move {
194 #[allow(clippy::match_single_binding)]
195 match message.opcode() {
196 0u16 => {
197 tracing::debug!("frog_color_managed_surface#{}.destroy()", sender_id,);
198 let result = self.destroy(client, sender_id).await;
199 client.remove(sender_id);
200 result
201 }
202 1u16 => {
203 let transfer_function = message.uint()?;
204 tracing::debug!(
205 "frog_color_managed_surface#{}.set_known_transfer_function({})",
206 sender_id,
207 transfer_function
208 );
209 self.set_known_transfer_function(
210 client,
211 sender_id,
212 transfer_function.try_into()?,
213 )
214 .await
215 }
216 2u16 => {
217 let primaries = message.uint()?;
218 tracing::debug!(
219 "frog_color_managed_surface#{}.set_known_container_color_volume({})",
220 sender_id,
221 primaries
222 );
223 self.set_known_container_color_volume(
224 client,
225 sender_id,
226 primaries.try_into()?,
227 )
228 .await
229 }
230 3u16 => {
231 let render_intent = message.uint()?;
232 tracing::debug!(
233 "frog_color_managed_surface#{}.set_render_intent({})",
234 sender_id,
235 render_intent
236 );
237 self.set_render_intent(client, sender_id, render_intent.try_into()?)
238 .await
239 }
240 4u16 => {
241 let mastering_display_primary_red_x = message.uint()?;
242 let mastering_display_primary_red_y = message.uint()?;
243 let mastering_display_primary_green_x = message.uint()?;
244 let mastering_display_primary_green_y = message.uint()?;
245 let mastering_display_primary_blue_x = message.uint()?;
246 let mastering_display_primary_blue_y = message.uint()?;
247 let mastering_white_point_x = message.uint()?;
248 let mastering_white_point_y = message.uint()?;
249 let max_display_mastering_luminance = message.uint()?;
250 let min_display_mastering_luminance = message.uint()?;
251 let max_cll = message.uint()?;
252 let max_fall = message.uint()?;
253 tracing::debug!(
254 "frog_color_managed_surface#{}.set_hdr_metadata({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {})",
255 sender_id,
256 mastering_display_primary_red_x,
257 mastering_display_primary_red_y,
258 mastering_display_primary_green_x,
259 mastering_display_primary_green_y,
260 mastering_display_primary_blue_x,
261 mastering_display_primary_blue_y,
262 mastering_white_point_x,
263 mastering_white_point_y,
264 max_display_mastering_luminance,
265 min_display_mastering_luminance,
266 max_cll,
267 max_fall
268 );
269 self.set_hdr_metadata(
270 client,
271 sender_id,
272 mastering_display_primary_red_x,
273 mastering_display_primary_red_y,
274 mastering_display_primary_green_x,
275 mastering_display_primary_green_y,
276 mastering_display_primary_blue_x,
277 mastering_display_primary_blue_y,
278 mastering_white_point_x,
279 mastering_white_point_y,
280 max_display_mastering_luminance,
281 min_display_mastering_luminance,
282 max_cll,
283 max_fall,
284 )
285 .await
286 }
287 opcode => Err(crate::server::error::Error::UnknownOpcode(opcode)),
288 }
289 }
290 }
291 #[doc = ""]
292 #[doc = "Destroying the color managed surface resets all known color"]
293 #[doc = "state for the surface back to 'undefined' implementation-specific"]
294 #[doc = "values."]
295 #[doc = ""]
296 fn destroy(
297 &self,
298 client: &mut crate::server::Client,
299 sender_id: crate::wire::ObjectId,
300 ) -> impl Future<Output = crate::server::Result<()>> + Send;
301 fn set_known_transfer_function(
302 &self,
303 client: &mut crate::server::Client,
304 sender_id: crate::wire::ObjectId,
305 transfer_function: TransferFunction,
306 ) -> impl Future<Output = crate::server::Result<()>> + Send;
307 fn set_known_container_color_volume(
308 &self,
309 client: &mut crate::server::Client,
310 sender_id: crate::wire::ObjectId,
311 primaries: Primaries,
312 ) -> impl Future<Output = crate::server::Result<()>> + Send;
313 #[doc = ""]
314 #[doc = "NOTE: On a surface with \"perceptual\" (default) render intent, handling of the container's color volume"]
315 #[doc = "is implementation-specific, and may differ between different transfer functions it is paired with:"]
316 #[doc = "ie. sRGB + 709 rendering may have it's primaries widened to more of the available display's gamut"]
317 #[doc = "to be be more pleasing for the viewer."]
318 #[doc = "Compared to scRGB Linear + 709 being treated faithfully as 709"]
319 #[doc = "(including utilizing negatives out of the 709 gamut triangle)"]
320 #[doc = ""]
321 fn set_render_intent(
322 &self,
323 client: &mut crate::server::Client,
324 sender_id: crate::wire::ObjectId,
325 render_intent: RenderIntent,
326 ) -> impl Future<Output = crate::server::Result<()>> + Send;
327 #[doc = ""]
328 #[doc = "Forwards HDR metadata from the client to the compositor."]
329 #[doc = ""]
330 #[doc = "HDR Metadata Infoframe as per CTA 861.G spec."]
331 #[doc = ""]
332 #[doc = "Usage of this HDR metadata is implementation specific and"]
333 #[doc = "outside of the scope of this protocol."]
334 #[doc = ""]
335 fn set_hdr_metadata(
336 &self,
337 client: &mut crate::server::Client,
338 sender_id: crate::wire::ObjectId,
339 mastering_display_primary_red_x: u32,
340 mastering_display_primary_red_y: u32,
341 mastering_display_primary_green_x: u32,
342 mastering_display_primary_green_y: u32,
343 mastering_display_primary_blue_x: u32,
344 mastering_display_primary_blue_y: u32,
345 mastering_white_point_x: u32,
346 mastering_white_point_y: u32,
347 max_display_mastering_luminance: u32,
348 min_display_mastering_luminance: u32,
349 max_cll: u32,
350 max_fall: u32,
351 ) -> impl Future<Output = crate::server::Result<()>> + Send;
352 #[doc = ""]
353 #[doc = "Current preferred metadata for a surface."]
354 #[doc = "The application should use this information to tone-map its buffers"]
355 #[doc = "to this target before committing."]
356 #[doc = ""]
357 #[doc = "This metadata does not necessarily correspond to any physical output, but"]
358 #[doc = "rather what the compositor thinks would be best for a given surface."]
359 #[doc = ""]
360 fn preferred_metadata(
361 &self,
362 client: &mut crate::server::Client,
363 sender_id: crate::wire::ObjectId,
364 transfer_function: TransferFunction,
365 output_display_primary_red_x: u32,
366 output_display_primary_red_y: u32,
367 output_display_primary_green_x: u32,
368 output_display_primary_green_y: u32,
369 output_display_primary_blue_x: u32,
370 output_display_primary_blue_y: u32,
371 output_white_point_x: u32,
372 output_white_point_y: u32,
373 max_luminance: u32,
374 min_luminance: u32,
375 max_full_frame_luminance: u32,
376 ) -> impl Future<Output = crate::server::Result<()>> + Send {
377 async move {
378 tracing::debug!(
379 "-> frog_color_managed_surface#{}.preferred_metadata({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {})",
380 sender_id,
381 transfer_function,
382 output_display_primary_red_x,
383 output_display_primary_red_y,
384 output_display_primary_green_x,
385 output_display_primary_green_y,
386 output_display_primary_blue_x,
387 output_display_primary_blue_y,
388 output_white_point_x,
389 output_white_point_y,
390 max_luminance,
391 min_luminance,
392 max_full_frame_luminance
393 );
394 let (payload, fds) = crate::wire::PayloadBuilder::new()
395 .put_uint(transfer_function as u32)
396 .put_uint(output_display_primary_red_x)
397 .put_uint(output_display_primary_red_y)
398 .put_uint(output_display_primary_green_x)
399 .put_uint(output_display_primary_green_y)
400 .put_uint(output_display_primary_blue_x)
401 .put_uint(output_display_primary_blue_y)
402 .put_uint(output_white_point_x)
403 .put_uint(output_white_point_y)
404 .put_uint(max_luminance)
405 .put_uint(min_luminance)
406 .put_uint(max_full_frame_luminance)
407 .build();
408 client
409 .send_message(crate::wire::Message::new(sender_id, 0u16, payload, fds))
410 .await
411 .map_err(crate::server::error::Error::IoError)
412 }
413 }
414 }
415 }
416}
417#[allow(clippy::module_inception)]
418pub mod frog_fifo_v1 {
419 #[doc = ""]
420 #[doc = "When a Wayland compositor considers applying a content update,"]
421 #[doc = "it must ensure all the update's readiness constraints (fences, etc)"]
422 #[doc = "are met."]
423 #[doc = ""]
424 #[doc = "This protocol provides a way to use the completion of a display refresh"]
425 #[doc = "cycle as an additional readiness constraint."]
426 #[doc = ""]
427 #[doc = "Warning! The protocol described in this file is currently in the testing"]
428 #[doc = "phase. Backward compatible changes may be added together with the"]
429 #[doc = "corresponding interface version bump. Backward incompatible changes can"]
430 #[doc = "only be done by creating a new major version of the extension."]
431 #[doc = ""]
432 #[allow(clippy::too_many_arguments)]
433 pub mod frog_fifo_manager_v1 {
434 #[allow(unused)]
435 use futures_util::SinkExt;
436 #[allow(unused)]
437 use std::os::fd::AsRawFd;
438 #[doc = ""]
439 #[doc = "These fatal protocol errors may be emitted in response to"]
440 #[doc = "illegal requests."]
441 #[doc = ""]
442 #[repr(u32)]
443 #[non_exhaustive]
444 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
445 pub enum Error {
446 #[doc = "fifo extension already exists for surface"]
447 FifoSurfaceAlreadyExists = 0u32,
448 }
449 impl TryFrom<u32> for Error {
450 type Error = crate::wire::DecodeError;
451 fn try_from(v: u32) -> Result<Self, Self::Error> {
452 match v {
453 0u32 => Ok(Self::FifoSurfaceAlreadyExists),
454 _ => Err(crate::wire::DecodeError::MalformedPayload),
455 }
456 }
457 }
458 impl std::fmt::Display for Error {
459 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
460 (*self as u32).fmt(f)
461 }
462 }
463 #[doc = "Trait to implement the frog_fifo_manager_v1 interface. See the module level documentation for more info"]
464 pub trait FrogFifoManagerV1: crate::server::Dispatcher {
465 const INTERFACE: &'static str = "frog_fifo_manager_v1";
466 const VERSION: u32 = 1u32;
467 fn handle_request(
468 &self,
469 client: &mut crate::server::Client,
470 sender_id: crate::wire::ObjectId,
471 message: &mut crate::wire::Message,
472 ) -> impl Future<Output = crate::server::Result<()>> + Send {
473 async move {
474 #[allow(clippy::match_single_binding)]
475 match message.opcode() {
476 0u16 => {
477 tracing::debug!("frog_fifo_manager_v1#{}.destroy()", sender_id,);
478 let result = self.destroy(client, sender_id).await;
479 client.remove(sender_id);
480 result
481 }
482 1u16 => {
483 let id = message
484 .object()?
485 .ok_or(crate::wire::DecodeError::MalformedPayload)?;
486 let surface = message
487 .object()?
488 .ok_or(crate::wire::DecodeError::MalformedPayload)?;
489 tracing::debug!(
490 "frog_fifo_manager_v1#{}.get_fifo({}, {})",
491 sender_id,
492 id,
493 surface
494 );
495 self.get_fifo(client, sender_id, id, surface).await
496 }
497 opcode => Err(crate::server::error::Error::UnknownOpcode(opcode)),
498 }
499 }
500 }
501 #[doc = ""]
502 #[doc = "Informs the server that the client will no longer be using"]
503 #[doc = "this protocol object. Existing objects created by this object"]
504 #[doc = "are not affected."]
505 #[doc = ""]
506 fn destroy(
507 &self,
508 client: &mut crate::server::Client,
509 sender_id: crate::wire::ObjectId,
510 ) -> impl Future<Output = crate::server::Result<()>> + Send;
511 #[doc = ""]
512 #[doc = "Establish a fifo object for a surface that may be used to add"]
513 #[doc = "display refresh constraints to content updates."]
514 #[doc = ""]
515 #[doc = "Only one such object may exist for a surface and attempting"]
516 #[doc = "to create more than one will result in a fifo_manager_already_exists"]
517 #[doc = "protocol error. If a surface is acted on by multiple software"]
518 #[doc = "components, general best practice is that only the component"]
519 #[doc = "performing wl_surface.attach operations should use this protocol."]
520 #[doc = ""]
521 fn get_fifo(
522 &self,
523 client: &mut crate::server::Client,
524 sender_id: crate::wire::ObjectId,
525 id: crate::wire::ObjectId,
526 surface: crate::wire::ObjectId,
527 ) -> impl Future<Output = crate::server::Result<()>> + Send;
528 }
529 }
530 #[doc = ""]
531 #[doc = "A fifo object for a surface that may be used to add"]
532 #[doc = "display refresh constraints to content updates."]
533 #[doc = ""]
534 #[allow(clippy::too_many_arguments)]
535 pub mod frog_fifo_surface_v1 {
536 #[allow(unused)]
537 use futures_util::SinkExt;
538 #[allow(unused)]
539 use std::os::fd::AsRawFd;
540 #[doc = ""]
541 #[doc = "These fatal protocol errors may be emitted in response to"]
542 #[doc = "illegal requests."]
543 #[doc = ""]
544 #[repr(u32)]
545 #[non_exhaustive]
546 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
547 pub enum Error {
548 #[doc = "the associated surface no longer exists"]
549 SurfaceDestroyed = 0u32,
550 }
551 impl TryFrom<u32> for Error {
552 type Error = crate::wire::DecodeError;
553 fn try_from(v: u32) -> Result<Self, Self::Error> {
554 match v {
555 0u32 => Ok(Self::SurfaceDestroyed),
556 _ => Err(crate::wire::DecodeError::MalformedPayload),
557 }
558 }
559 }
560 impl std::fmt::Display for Error {
561 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
562 (*self as u32).fmt(f)
563 }
564 }
565 #[doc = "Trait to implement the frog_fifo_surface_v1 interface. See the module level documentation for more info"]
566 pub trait FrogFifoSurfaceV1: crate::server::Dispatcher {
567 const INTERFACE: &'static str = "frog_fifo_surface_v1";
568 const VERSION: u32 = 1u32;
569 fn handle_request(
570 &self,
571 client: &mut crate::server::Client,
572 sender_id: crate::wire::ObjectId,
573 message: &mut crate::wire::Message,
574 ) -> impl Future<Output = crate::server::Result<()>> + Send {
575 async move {
576 #[allow(clippy::match_single_binding)]
577 match message.opcode() {
578 0u16 => {
579 tracing::debug!("frog_fifo_surface_v1#{}.set_barrier()", sender_id,);
580 self.set_barrier(client, sender_id).await
581 }
582 1u16 => {
583 tracing::debug!("frog_fifo_surface_v1#{}.wait_barrier()", sender_id,);
584 self.wait_barrier(client, sender_id).await
585 }
586 2u16 => {
587 tracing::debug!("frog_fifo_surface_v1#{}.destroy()", sender_id,);
588 let result = self.destroy(client, sender_id).await;
589 client.remove(sender_id);
590 result
591 }
592 opcode => Err(crate::server::error::Error::UnknownOpcode(opcode)),
593 }
594 }
595 }
596 #[doc = ""]
597 #[doc = "When the content update containing the \"set_barrier\" is applied,"]
598 #[doc = "it sets a \"fifo_barrier\" condition on the surface associated with"]
599 #[doc = "the fifo object. The condition is cleared immediately after the"]
600 #[doc = "following latching deadline for non-tearing presentation."]
601 #[doc = "The condition needs to be cleared soon enough so that forward"]
602 #[doc = "progress for the application is guaranteed. The exact rate at which"]
603 #[doc = "that happens is implementation defined."]
604 #[doc = ""]
605 #[doc = "To wait for this condition to clear, use the \"wait_barrier\" request."]
606 #[doc = ""]
607 #[doc = "\"set_barrier\" is double-buffered state, see wl_surface.commit."]
608 #[doc = ""]
609 #[doc = "Requesting set_barrier after the fifo object's surface is"]
610 #[doc = "destroyed will generate a \"surface_destroyed\" error."]
611 #[doc = ""]
612 fn set_barrier(
613 &self,
614 client: &mut crate::server::Client,
615 sender_id: crate::wire::ObjectId,
616 ) -> impl Future<Output = crate::server::Result<()>> + Send;
617 #[doc = ""]
618 #[doc = "Indicate that this content update is not ready while a"]
619 #[doc = "\"fifo_barrier\" condition is present on the surface."]
620 #[doc = ""]
621 #[doc = "This means that when the content update containing \"set_barrier\""]
622 #[doc = "was made active at a latching deadline, it will be active for"]
623 #[doc = "at least one refresh cycle. A content update which is allowed to"]
624 #[doc = "tear might become active after a latching deadline if no content"]
625 #[doc = "update became active at the deadline."]
626 #[doc = ""]
627 #[doc = "\"wait_barrier\" is double-buffered state, see wl_surface.commit."]
628 #[doc = ""]
629 #[doc = "Requesting \"wait_barrier\" after the fifo object's surface is"]
630 #[doc = "destroyed will generate a \"surface_destroyed\" error."]
631 #[doc = ""]
632 fn wait_barrier(
633 &self,
634 client: &mut crate::server::Client,
635 sender_id: crate::wire::ObjectId,
636 ) -> impl Future<Output = crate::server::Result<()>> + Send;
637 #[doc = ""]
638 #[doc = "Informs the server that the client will no longer be using"]
639 #[doc = "this protocol object."]
640 #[doc = ""]
641 #[doc = "Surface state changes previously made by this protocol are"]
642 #[doc = "unaffected by this object's destruction."]
643 #[doc = ""]
644 fn destroy(
645 &self,
646 client: &mut crate::server::Client,
647 sender_id: crate::wire::ObjectId,
648 ) -> impl Future<Output = crate::server::Result<()>> + Send;
649 }
650 }
651}