aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backend/drm/renderer.h4
-rw-r--r--include/render/drm_format_set.h5
-rw-r--r--include/types/wlr_output.h5
3 files changed, 8 insertions, 6 deletions
diff --git a/include/backend/drm/renderer.h b/include/backend/drm/renderer.h
index 5851d228..07fcf28a 100644
--- a/include/backend/drm/renderer.h
+++ b/include/backend/drm/renderer.h
@@ -50,8 +50,8 @@ struct wlr_drm_fb *drm_fb_lock(struct wlr_drm_fb *fb);
struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
struct wlr_buffer *buffer);
-struct wlr_drm_format *drm_plane_pick_render_format(
- struct wlr_drm_plane *plane, struct wlr_drm_renderer *renderer);
+bool drm_plane_pick_render_format(struct wlr_drm_plane *plane,
+ struct wlr_drm_format *fmt, struct wlr_drm_renderer *renderer);
void drm_plane_finish_surface(struct wlr_drm_plane *plane);
#endif
diff --git a/include/render/drm_format_set.h b/include/render/drm_format_set.h
index 1ffc2a90..ea192a50 100644
--- a/include/render/drm_format_set.h
+++ b/include/render/drm_format_set.h
@@ -8,13 +8,14 @@ bool wlr_drm_format_has(const struct wlr_drm_format *fmt, uint64_t modifier);
bool wlr_drm_format_add(struct wlr_drm_format *fmt, uint64_t modifier);
bool wlr_drm_format_copy(struct wlr_drm_format *dst, const struct wlr_drm_format *src);
/**
- * Intersect modifiers for two DRM formats.
+ * Intersect modifiers for two DRM formats. The `dst` must be zeroed or initialized
+ * with other state being replaced.
*
* Both arguments must have the same format field. If the formats aren't
* compatible, NULL is returned. If either format doesn't support any modifier,
* a format that doesn't support any modifier is returned.
*/
-struct wlr_drm_format *wlr_drm_format_intersect(
+bool wlr_drm_format_intersect(struct wlr_drm_format *dst,
const struct wlr_drm_format *a, const struct wlr_drm_format *b);
bool wlr_drm_format_set_copy(struct wlr_drm_format_set *dst, const struct wlr_drm_format_set *src);
diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h
index 5c1d8fab..e754053f 100644
--- a/include/types/wlr_output.h
+++ b/include/types/wlr_output.h
@@ -7,8 +7,9 @@
void output_pending_resolution(struct wlr_output *output,
const struct wlr_output_state *state, int *width, int *height);
-struct wlr_drm_format *output_pick_format(struct wlr_output *output,
- const struct wlr_drm_format_set *display_formats, uint32_t format);
+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,
const struct wlr_output_state *state, bool *new_back_buffer);