mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
matrix: unify API, don't use array pointers
This commit is contained in:
parent
b6a3f240c7
commit
d26b67cb06
18 changed files with 172 additions and 167 deletions
|
|
@ -290,14 +290,14 @@ static void render_surface(struct wlr_surface *surface, double lx, double ly,
|
|||
float matrix[16];
|
||||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(surface->current->transform);
|
||||
wlr_matrix_project_box(&matrix, &box, transform, rotation,
|
||||
&output->wlr_output->transform_matrix);
|
||||
wlr_matrix_project_box(matrix, &box, transform, rotation,
|
||||
output->wlr_output->transform_matrix);
|
||||
|
||||
int nrects;
|
||||
pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
|
||||
for (int i = 0; i < nrects; ++i) {
|
||||
scissor_output(output, &rects[i]);
|
||||
wlr_render_with_matrix(renderer, surface->texture, &matrix, data->alpha);
|
||||
wlr_render_with_matrix(renderer, surface->texture, matrix, data->alpha);
|
||||
}
|
||||
|
||||
damage_finish:
|
||||
|
|
@ -354,8 +354,8 @@ static void render_decorations(struct roots_view *view,
|
|||
}
|
||||
|
||||
float matrix[16];
|
||||
wlr_matrix_project_box(&matrix, &box, WL_OUTPUT_TRANSFORM_NORMAL,
|
||||
view->rotation, &output->wlr_output->transform_matrix);
|
||||
wlr_matrix_project_box(matrix, &box, WL_OUTPUT_TRANSFORM_NORMAL,
|
||||
view->rotation, output->wlr_output->transform_matrix);
|
||||
float color[] = { 0.2, 0.2, 0.2, view->alpha };
|
||||
|
||||
int nrects;
|
||||
|
|
@ -363,7 +363,7 @@ static void render_decorations(struct roots_view *view,
|
|||
pixman_region32_rectangles(&damage, &nrects);
|
||||
for (int i = 0; i < nrects; ++i) {
|
||||
scissor_output(output, &rects[i]);
|
||||
wlr_render_colored_quad(renderer, &color, &matrix);
|
||||
wlr_render_colored_quad(renderer, color, matrix);
|
||||
}
|
||||
|
||||
damage_finish:
|
||||
|
|
@ -489,7 +489,7 @@ static void render_output(struct roots_output *output) {
|
|||
pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
|
||||
for (int i = 0; i < nrects; ++i) {
|
||||
scissor_output(output, &rects[i]);
|
||||
wlr_renderer_clear(renderer, &clear_color);
|
||||
wlr_renderer_clear(renderer, clear_color);
|
||||
}
|
||||
|
||||
// If a view is fullscreen on this output, render it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue