mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
output: rename impl->rollback to rollback_render
The output backend API is now mostly state-less thanks to the atomic hooks (commit and test). There is one exception though: attach_render. This function makes the rendering context current. However sometimes the compositor might decide not to render after attach_render (e.g. when there's nothing new to render to the back buffer). Thus wlr_output_rollback has been introduced to revert the pending state. Because the output backend API is mostly state-less, the only thing wlr_output_impl.rollback needs to do is revert the current rendering context. Rename the function to rollback_render to make this clear. Add a check in the common wlr_output code to only call rollback_render when attach_buffer has been previously called. On the long term, we'll be able to remove attach_render and rollback_render together.
This commit is contained in:
parent
58df3eda9f
commit
bf93d2e67c
6 changed files with 18 additions and 17 deletions
|
|
@ -586,7 +586,7 @@ static bool drm_connector_commit(struct wlr_output *output) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static void drm_connector_rollback(struct wlr_output *output) {
|
||||
static void drm_connector_rollback_render(struct wlr_output *output) {
|
||||
struct wlr_drm_backend *drm = get_drm_backend_from_backend(output->backend);
|
||||
wlr_egl_unset_current(&drm->renderer.egl);
|
||||
}
|
||||
|
|
@ -1024,7 +1024,7 @@ static const struct wlr_output_impl output_impl = {
|
|||
.attach_render = drm_connector_attach_render,
|
||||
.test = drm_connector_test,
|
||||
.commit = drm_connector_commit,
|
||||
.rollback = drm_connector_rollback,
|
||||
.rollback_render = drm_connector_rollback_render,
|
||||
.get_gamma_size = drm_connector_get_gamma_size,
|
||||
.export_dmabuf = drm_connector_export_dmabuf,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue