mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Stop using wlr_texture_get_size
Just use wlr_texture.{width,height} directly.
This commit is contained in:
parent
ae5275c09f
commit
b9460ab724
5 changed files with 14 additions and 18 deletions
|
|
@ -78,13 +78,10 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
|
|||
wlr_renderer_begin(sample->renderer, wlr_output->width, wlr_output->height);
|
||||
wlr_renderer_clear(sample->renderer, (float[]){0.25f, 0.25f, 0.25f, 1});
|
||||
|
||||
int tex_width, tex_height;
|
||||
wlr_texture_get_size(sample->cat_texture, &tex_width, &tex_height);
|
||||
|
||||
struct touch_point *p;
|
||||
wl_list_for_each(p, &sample->touch_points, link) {
|
||||
int x = (int)(p->x * width) - tex_width / 2;
|
||||
int y = (int)(p->y * height) - tex_height / 2;
|
||||
int x = (int)(p->x * width) - sample->cat_texture->width / 2;
|
||||
int y = (int)(p->y * height) - sample->cat_texture->height / 2;
|
||||
wlr_render_texture(sample->renderer, sample->cat_texture,
|
||||
wlr_output->transform_matrix, x, y, 1.0f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue