diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/types/wlr_output.h | 1 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 32 |
2 files changed, 15 insertions, 18 deletions
diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h index e1aea1be..7bc06f90 100644 --- a/include/types/wlr_output.h +++ b/include/types/wlr_output.h @@ -12,7 +12,6 @@ bool output_pending_enabled(struct wlr_output *output, bool output_pick_format(struct wlr_output *output, const struct wlr_drm_format_set *display_formats, struct wlr_drm_format *format, uint32_t fmt); -void output_clear_back_buffer(struct wlr_output *output); bool output_ensure_buffer(struct wlr_output *output, struct wlr_output_state *state, bool *new_back_buffer); diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index a2e1fbae..2740abda 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -283,7 +283,7 @@ void wlr_output_destroy_global(struct wlr_output *output); * renderer. After initialization, this function may invoked again to reinitialize * the allocator and renderer to different values. * - * Call this function prior to any call to wlr_output_attach_render(), + * Call this function prior to any call to wlr_output_begin_render_pass(), * wlr_output_commit() or wlr_output_cursor_create(). * * The buffer capabilities of the provided must match the capabilities of the @@ -347,7 +347,7 @@ void wlr_output_enable_adaptive_sync(struct wlr_output *output, bool enabled); * hardware and software permit this. * * This only affects the format of the output buffer used when rendering, - * as with wlr_output_attach_render(). It has no impact on the cursor buffer + * as with wlr_output_begin_render_pass(). It has no impact on the cursor buffer * format, or on the formats supported for direct scan-out (see also * wlr_output_attach_buffer()). * @@ -392,19 +392,6 @@ void wlr_output_transformed_resolution(struct wlr_output *output, void wlr_output_effective_resolution(struct wlr_output *output, int *width, int *height); /** - * Attach the renderer's buffer to the output. Compositors must call this - * function before rendering. After they are done rendering, they should call - * wlr_output_commit() to submit the new frame. The output needs to be - * enabled. - * - * If non-NULL, `buffer_age` is set to the drawing buffer age in number of - * frames or -1 if unknown. This is useful for damage tracking. - * - * If the compositor decides not to render after calling this function, it - * must call wlr_output_rollback(). - */ -bool wlr_output_attach_render(struct wlr_output *output, int *buffer_age); -/** * Attach a buffer to the output. Compositors should call wlr_output_commit() * to submit the new frame. The output needs to be enabled. * @@ -450,7 +437,7 @@ void wlr_output_set_layers(struct wlr_output *output, */ bool wlr_output_test(struct wlr_output *output); /** - * Commit the pending output state. If wlr_output_attach_render() has been + * Commit the pending output state. If wlr_output_begin_render_pass() has been * called, the pending frame will be submitted for display and a `frame` event * will be scheduled. * @@ -721,7 +708,18 @@ bool wlr_output_configure_primary_swapchain(struct wlr_output *output, /** * Begin a render pass on this output. * - * Same as wlr_output_attach_render(), but returns a struct wlr_render_pass. + * Compositors can call this function to begin rendering. After the render pass + * has been submitted, they should call wlr_output_commit_state() to submit the + * new frame. + * + * On error, NULL is returned. Creating a render pass on a disabled output is + * an error. + * + * The state describes the output changes the rendered frame will be + * committed with. A NULL state indicates no change. + * + * If non-NULL, buffer_age is set to the drawing buffer age in number of + * frames or -1 if unknown. This is useful for damage tracking. */ struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output, struct wlr_output_state *state, int *buffer_age, struct wlr_render_timer *timer); |