mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-19 08:56:27 -05:00
render/texture: drop wlr_texture_is_opaque
Whether a texture is opaque or not doesn't depend on the renderer at all, it just depends on the source buffer. Instead of forcing all renderers to implement wlr_texture_impl.is_opaque, let's move this in common code and use the wlr_buffer format to know whether a texture will be opaque.
This commit is contained in:
parent
f28c0e2046
commit
29291cb47c
10 changed files with 42 additions and 35 deletions
|
|
@ -69,4 +69,13 @@ struct wlr_dmabuf_buffer *dmabuf_buffer_create(
|
|||
*/
|
||||
bool dmabuf_buffer_drop(struct wlr_dmabuf_buffer *buffer);
|
||||
|
||||
/**
|
||||
* Check whether a buffer is fully opaque.
|
||||
*
|
||||
* When true is returned, the buffer is guaranteed to be fully opaque, but the
|
||||
* reverse is not true: false may be returned in cases where the buffer is fully
|
||||
* opaque.
|
||||
*/
|
||||
bool buffer_is_opaque(struct wlr_buffer *buffer);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue