aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-18 09:41:50 -0400
committerGitHub <noreply@github.com>2018-03-18 09:41:50 -0400
commit9823a7c6c8cd5556390d2a53f34e30c3689bc6fd (patch)
tree2fe92514ce2547a3ef1b9a4e2e66d99315da3857 /sway/desktop/output.c
parent75230fdc2b5c45b762e5a68c500a7c5076c19091 (diff)
parent1004915796cf6d416124c6b3e92317b15d0c1424 (diff)
Merge pull request #1625 from emersion/matrix-redesign
Update rendering code for wlroots matrix redesign
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 08fe5877..247c279f 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -3,19 +3,19 @@
#include <stdlib.h>
#include <time.h>
#include <wayland-server.h>
+#include <wlr/render.h>
+#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_wl_shell.h>
-#include <wlr/render.h>
-#include <wlr/render/matrix.h>
#include "log.h"
#include "sway/container.h"
+#include "sway/input/input-manager.h"
+#include "sway/input/seat.h"
#include "sway/layout.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/view.h"
-#include "sway/input/input-manager.h"
-#include "sway/input/seat.h"
/**
* Rotate a child's position relative to a parent. The parent size is (pw, ph),
@@ -59,11 +59,11 @@ static void render_surface(struct wlr_surface *surface,
.x = lx, .y = ly,
.width = render_width, .height = render_height
};
- float matrix[16];
- wlr_matrix_project_box(&matrix, &render_box,
- surface->current->transform, 0, &wlr_output->transform_matrix);
- wlr_render_with_matrix(server.renderer, surface->texture,
- &matrix, 1.0f); // TODO: configurable alpha
+ float matrix[9];
+ wlr_matrix_project_box(matrix, &render_box, surface->current->transform,
+ 0, wlr_output->transform_matrix);
+ wlr_render_texture_with_matrix(server.renderer, surface->texture,
+ matrix, 1.0f); // TODO: configurable alpha
wlr_surface_send_frame_done(surface, when);
}
@@ -183,7 +183,7 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
struct sway_server *server = soutput->server;
float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f};
struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
- wlr_renderer_clear(renderer, &clear_color);
+ wlr_renderer_clear(renderer, clear_color);
int buffer_age = -1;
wlr_output_make_current(wlr_output, &buffer_age);