Stop using wlr_texture_get_size

Just use wlr_texture.{width,height} directly.
This commit is contained in:
Simon Ser 2020-12-25 12:21:29 +01:00
parent ae5275c09f
commit b9460ab724
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
5 changed files with 14 additions and 18 deletions

View file

@ -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);
}