mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
render/texture: add width and height fields
Instead of requiring compositors to call wlr_texture_get_size each time they want to access the texture's size, expose this information as wlr_texture fields.
This commit is contained in:
parent
21397e2b4a
commit
06f4c3945d
5 changed files with 32 additions and 31 deletions
|
|
@ -70,7 +70,6 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
|
|||
const struct wlr_renderer_impl *impl);
|
||||
|
||||
struct wlr_texture_impl {
|
||||
void (*get_size)(struct wlr_texture *texture, int *width, int *height);
|
||||
bool (*is_opaque)(struct wlr_texture *texture);
|
||||
bool (*write_pixels)(struct wlr_texture *texture,
|
||||
uint32_t stride, uint32_t width, uint32_t height,
|
||||
|
|
@ -82,6 +81,6 @@ struct wlr_texture_impl {
|
|||
};
|
||||
|
||||
void wlr_texture_init(struct wlr_texture *texture,
|
||||
const struct wlr_texture_impl *impl);
|
||||
const struct wlr_texture_impl *impl, uint32_t width, uint32_t height);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue