.TH "wayland::server::zwp_linux_surface_synchronization_v1_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::zwp_linux_surface_synchronization_v1_t \- per-surface explicit synchronization support .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits wayland::server::resource_t\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "std::function< void()> & \fBon_destroy\fP ()" .br .RI "destroy synchronization object " .ti -1c .RI "std::function< void(int)> & \fBon_set_acquire_fence\fP ()" .br .RI "set the acquire fence " .ti -1c .RI "std::function< void(\fBzwp_linux_buffer_release_v1_t\fP)> & \fBon_get_release\fP ()" .br .RI "release fence for last-attached buffer " .ti -1c .RI "void \fBpost_invalid_fence\fP (std::string const &msg)" .br .RI "Post error: the fence specified by the client could not be imported\&. " .ti -1c .RI "void \fBpost_duplicate_fence\fP (std::string const &msg)" .br .RI "Post error: multiple fences added for a single surface commit\&. " .ti -1c .RI "void \fBpost_duplicate_release\fP (std::string const &msg)" .br .RI "Post error: multiple releases added for a single surface commit\&. " .ti -1c .RI "void \fBpost_no_surface\fP (std::string const &msg)" .br .RI "Post error: the associated wl_surface was destroyed\&. " .ti -1c .RI "void \fBpost_unsupported_buffer\fP (std::string const &msg)" .br .RI "Post error: the buffer does not support explicit synchronization\&. " .ti -1c .RI "void \fBpost_no_buffer\fP (std::string const &msg)" .br .RI "Post error: no buffer was attached\&. " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "void \fBpost_no_memory\fP () const" .br .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .ti -1c .RI "client_t \fBget_client\fP () const" .br .ti -1c .RI "unsigned int \fBget_version\fP () const" .br .ti -1c .RI "std::string \fBget_class\fP ()" .br .in -1c .SH "Detailed Description" .PP per-surface explicit synchronization support This object implements per-surface explicit synchronization\&. .PP Synchronization refers to co-ordination of pipelined operations performed on buffers\&. Most GPU clients will schedule an asynchronous operation to render to the buffer, then immediately send the buffer to the compositor to be attached to a surface\&. .PP In implicit synchronization, ensuring that the rendering operation is complete before the compositor displays the buffer is an implementation detail handled by either the kernel or userspace graphics driver\&. .PP By contrast, in explicit synchronization, dma_fence objects mark when the asynchronous operations are complete\&. When submitting a buffer, the client provides an acquire fence which will be waited on before the compositor accesses the buffer\&. The Wayland server, through a zwp_linux_buffer_release_v1 object, will inform the client with an event which may be accompanied by a release fence, when the compositor will no longer access the buffer contents due to the specific commit that requested the release event\&. .PP Each surface can be associated with only one object of this interface at any time\&. .PP In version 1 of this interface, explicit synchronization is only guaranteed to be supported for buffers created with any version of the wp_linux_dmabuf buffer factory\&. Version 2 additionally guarantees explicit synchronization support for opaque EGL buffers, which is a type of platform specific buffers described in the EGL_WL_bind_wayland_display extension\&. Compositors are free to support explicit synchronization for additional buffer types\&. .PP Definition at line \fB2455\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "std::string wayland::server::resource_t::get_class ()\fC [inherited]\fP" Retrieve the interface name (class) of a resource object\&. .PP \fBReturns\fP .RS 4 Interface name of the resource object\&. .RE .PP .SS "client_t wayland::server::resource_t::get_client () const\fC [inherited]\fP" Get the associated client .PP \fBReturns\fP .RS 4 the client that owns the resource\&. .RE .PP .SS "uint32_t wayland::server::resource_t::get_id () const\fC [inherited]\fP" Get the internal ID of the resource .PP \fBReturns\fP .RS 4 the internal ID of the resource .RE .PP .SS "unsigned int wayland::server::resource_t::get_version () const\fC [inherited]\fP" Get interface version .PP \fBReturns\fP .RS 4 Interface version this resource has been constructed with\&. .RE .PP .SS "std::function< void()> & zwp_linux_surface_synchronization_v1_t::on_destroy ()" .PP destroy synchronization object Destroy this explicit synchronization object\&. .PP Any fence set by this object with set_acquire_fence since the last commit will be discarded by the server\&. Any fences set by this object before the last commit are not affected\&. .PP zwp_linux_buffer_release_v1 objects created by this object are not affected by this request\&. .PP Definition at line \fB5250\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBzwp_linux_buffer_release_v1_t\fP)> & zwp_linux_surface_synchronization_v1_t::on_get_release ()" .PP release fence for last-attached buffer .PP \fBParameters\fP .RS 4 \fIrelease\fP new zwp_linux_buffer_release_v1 object .RE .PP Create a listener for the release of the buffer attached by the client with wl_surface\&.attach\&. See zwp_linux_buffer_release_v1 documentation for more information\&. .PP The release object is double-buffered state, and will be associated with the buffer that is attached to the surface at wl_surface\&.commit time\&. .PP If a zwp_linux_buffer_release_v1 object has already been requested for the surface in the same commit cycle, a DUPLICATE_RELEASE error is raised\&. .PP If the associated wl_surface was destroyed, a NO_SURFACE error is raised\&. .PP If at surface commit time there is no buffer attached, a NO_BUFFER error is raised\&. .PP Definition at line \fB5262\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(int)> & zwp_linux_surface_synchronization_v1_t::on_set_acquire_fence ()" .PP set the acquire fence .PP \fBParameters\fP .RS 4 \fIfd\fP acquire fence fd .RE .PP Set the acquire fence that must be signaled before the compositor may sample from the buffer attached with wl_surface\&.attach\&. The fence is a dma_fence kernel object\&. .PP The acquire fence is double-buffered state, and will be applied on the next wl_surface\&.commit request for the associated surface\&. Thus, it applies only to the buffer that is attached to the surface at commit time\&. .PP If the provided fd is not a valid dma_fence fd, then an INVALID_FENCE error is raised\&. .PP If a fence has already been attached during the same commit cycle, a DUPLICATE_FENCE error is raised\&. .PP If the associated wl_surface was destroyed, a NO_SURFACE error is raised\&. .PP If at surface commit time the attached buffer does not support explicit synchronization, an UNSUPPORTED_BUFFER error is raised\&. .PP If at surface commit time there is no buffer attached, a NO_BUFFER error is raised\&. .PP Definition at line \fB5256\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zwp_linux_surface_synchronization_v1_t::post_duplicate_fence (std::string const & msg)" .PP Post error: multiple fences added for a single surface commit\&. .PP Definition at line \fB5273\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zwp_linux_surface_synchronization_v1_t::post_duplicate_release (std::string const & msg)" .PP Post error: multiple releases added for a single surface commit\&. .PP Definition at line \fB5278\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zwp_linux_surface_synchronization_v1_t::post_invalid_fence (std::string const & msg)" .PP Post error: the fence specified by the client could not be imported\&. .PP Definition at line \fB5268\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zwp_linux_surface_synchronization_v1_t::post_no_buffer (std::string const & msg)" .PP Post error: no buffer was attached\&. .PP Definition at line \fB5293\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void wayland::server::resource_t::post_no_memory () const\fC [inherited]\fP" Post 'not enough memory' error to the client .PP If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance\&. .SS "void zwp_linux_surface_synchronization_v1_t::post_no_surface (std::string const & msg)" .PP Post error: the associated wl_surface was destroyed\&. .PP Definition at line \fB5283\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zwp_linux_surface_synchronization_v1_t::post_unsupported_buffer (std::string const & msg)" .PP Post error: the buffer does not support explicit synchronization\&. .PP Definition at line \fB5288\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "bool wayland::server::resource_t::proxy_has_object () const\fC [inherited]\fP" .PP Check whether this wrapper actually wraps an object\&. .PP \fBReturns\fP .RS 4 true if there is an underlying object, false if this wrapper is empty .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.