aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-25 12:21:29 +0100
committerSimon Ser <contact@emersion.fr>2020-12-25 12:21:29 +0100
commitb9460ab724fb8df18d22cb0e10cf6e07646fc1cf (patch)
tree0ec73b0989d250debb08d6576c2477c104e28284 /render
parentae5275c09fbd2cce326dee2b6d13fd8b9cdc08aa (diff)
Stop using wlr_texture_get_size
Just use wlr_texture.{width,height} directly.
Diffstat (limited to 'render')
-rw-r--r--render/wlr_renderer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index b8374be9..fc224467 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -76,8 +76,12 @@ void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box) {
bool wlr_render_texture(struct wlr_renderer *r, struct wlr_texture *texture,
const float projection[static 9], int x, int y, float alpha) {
- struct wlr_box box = { .x = x, .y = y };
- wlr_texture_get_size(texture, &box.width, &box.height);
+ struct wlr_box box = {
+ .x = x,
+ .y = y,
+ .width = texture->width,
+ .height = texture->height,
+ };
float matrix[9];
wlr_matrix_project_box(matrix, &box, WL_OUTPUT_TRANSFORM_NORMAL, 0,