mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
Implement partial texture uploads
This commit is contained in:
parent
b109aecff9
commit
4de930542f
5 changed files with 100 additions and 6 deletions
|
|
@ -25,11 +25,24 @@ bool wlr_texture_upload_pixels(struct wlr_texture *texture, uint32_t format,
|
|||
format, stride, width, height, pixels);
|
||||
}
|
||||
|
||||
bool wlr_texture_update_pixels(struct wlr_texture *texture,
|
||||
enum wl_shm_format format, int stride, int x, int y,
|
||||
int width, int height, const unsigned char *pixels) {
|
||||
return texture->impl->update_pixels(texture->state,
|
||||
format, stride, x, y, width, height, pixels);
|
||||
}
|
||||
|
||||
bool wlr_texture_upload_shm(struct wlr_texture *texture, uint32_t format,
|
||||
struct wl_shm_buffer *shm) {
|
||||
return texture->impl->upload_shm(texture->state, format, shm);
|
||||
}
|
||||
|
||||
bool wlr_texture_update_shm(struct wlr_texture *texture, uint32_t format,
|
||||
int x, int y, int width, int height, struct wl_shm_buffer *shm) {
|
||||
return texture->impl->update_shm(texture->state, format,
|
||||
x, y, width, height, shm);
|
||||
}
|
||||
|
||||
void wlr_texture_get_matrix(struct wlr_texture *texture,
|
||||
float (*matrix)[16], const float (*projection)[16], int x, int y) {
|
||||
texture->impl->get_matrix(texture->state, matrix, projection, x, y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue