mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-24 08:56:28 -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
|
|
@ -71,13 +71,6 @@ struct wlr_texture *wlr_texture_from_buffer(struct wlr_renderer *renderer,
|
|||
return renderer->impl->texture_from_buffer(renderer, buffer);
|
||||
}
|
||||
|
||||
bool wlr_texture_is_opaque(struct wlr_texture *texture) {
|
||||
if (!texture->impl->is_opaque) {
|
||||
return false;
|
||||
}
|
||||
return texture->impl->is_opaque(texture);
|
||||
}
|
||||
|
||||
bool wlr_texture_write_pixels(struct wlr_texture *texture,
|
||||
uint32_t stride, uint32_t width, uint32_t height,
|
||||
uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue