matrix: rename wlr_matrix_texture to wlr_matrix_projection

This commit is contained in:
emersion 2018-03-15 21:26:45 +01:00
parent 876f07e9f1
commit 7894fca224
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
4 changed files with 6 additions and 8 deletions

View File

@ -587,8 +587,8 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
enum wl_output_transform transform = wlr_output_transform_compose(
wlr_output_transform_invert(output->transform),
WL_OUTPUT_TRANSFORM_FLIPPED_180);
wlr_matrix_texture(plane->matrix, plane->surf.width, plane->surf.height,
transform);
wlr_matrix_projection(plane->matrix, plane->surf.width,
plane->surf.height, transform);
plane->wlr_tex =
wlr_render_texture_create(plane->surf.renderer->wlr_rend);

View File

@ -1,7 +1,6 @@
#ifndef WLR_TYPES_WLR_MATRIX_H
#define WLR_TYPES_WLR_MATRIX_H
#include <stdint.h>
#include <wayland-server.h>
#include <wlr/types/wlr_box.h>
@ -13,8 +12,7 @@ void wlr_matrix_multiply(float mat[static 9], const float a[static 9],
const float b[static 9]);
void wlr_matrix_transform(float mat[static 9],
enum wl_output_transform transform);
void wlr_matrix_texture(float mat[static 9], int32_t width, int32_t height,
void wlr_matrix_projection(float mat[static 9], int width, int height,
enum wl_output_transform transform);
void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box,
enum wl_output_transform transform, float rotation,

View File

@ -109,7 +109,7 @@ void wlr_matrix_transform(float mat[static 9],
}
// Equivilent to glOrtho(0, width, 0, height, 1, -1) with the transform applied
void wlr_matrix_texture(float mat[static 9], int32_t width, int32_t height,
void wlr_matrix_projection(float mat[static 9], int width, int height,
enum wl_output_transform transform) {
memset(mat, 0, sizeof(*mat) * 9);

View File

@ -139,8 +139,8 @@ void wlr_output_update_enabled(struct wlr_output *output, bool enabled) {
}
static void wlr_output_update_matrix(struct wlr_output *output) {
wlr_matrix_texture(output->transform_matrix, output->width, output->height,
output->transform);
wlr_matrix_projection(output->transform_matrix, output->width,
output->height, output->transform);
}
void wlr_output_enable(struct wlr_output *output, bool enable) {