matrix: rename wlr_matrix_texture to wlr_matrix_projection
This commit is contained in:
parent
876f07e9f1
commit
7894fca224
|
@ -587,8 +587,8 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
|
||||||
enum wl_output_transform transform = wlr_output_transform_compose(
|
enum wl_output_transform transform = wlr_output_transform_compose(
|
||||||
wlr_output_transform_invert(output->transform),
|
wlr_output_transform_invert(output->transform),
|
||||||
WL_OUTPUT_TRANSFORM_FLIPPED_180);
|
WL_OUTPUT_TRANSFORM_FLIPPED_180);
|
||||||
wlr_matrix_texture(plane->matrix, plane->surf.width, plane->surf.height,
|
wlr_matrix_projection(plane->matrix, plane->surf.width,
|
||||||
transform);
|
plane->surf.height, transform);
|
||||||
|
|
||||||
plane->wlr_tex =
|
plane->wlr_tex =
|
||||||
wlr_render_texture_create(plane->surf.renderer->wlr_rend);
|
wlr_render_texture_create(plane->surf.renderer->wlr_rend);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef WLR_TYPES_WLR_MATRIX_H
|
#ifndef WLR_TYPES_WLR_MATRIX_H
|
||||||
#define WLR_TYPES_WLR_MATRIX_H
|
#define WLR_TYPES_WLR_MATRIX_H
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <wayland-server.h>
|
#include <wayland-server.h>
|
||||||
#include <wlr/types/wlr_box.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]);
|
const float b[static 9]);
|
||||||
void wlr_matrix_transform(float mat[static 9],
|
void wlr_matrix_transform(float mat[static 9],
|
||||||
enum wl_output_transform transform);
|
enum wl_output_transform transform);
|
||||||
|
void wlr_matrix_projection(float mat[static 9], int width, int height,
|
||||||
void wlr_matrix_texture(float mat[static 9], int32_t width, int32_t height,
|
|
||||||
enum wl_output_transform transform);
|
enum wl_output_transform transform);
|
||||||
void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box,
|
void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box,
|
||||||
enum wl_output_transform transform, float rotation,
|
enum wl_output_transform transform, float rotation,
|
||||||
|
|
|
@ -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
|
// 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) {
|
enum wl_output_transform transform) {
|
||||||
memset(mat, 0, sizeof(*mat) * 9);
|
memset(mat, 0, sizeof(*mat) * 9);
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
static void wlr_output_update_matrix(struct wlr_output *output) {
|
||||||
wlr_matrix_texture(output->transform_matrix, output->width, output->height,
|
wlr_matrix_projection(output->transform_matrix, output->width,
|
||||||
output->transform);
|
output->height, output->transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_output_enable(struct wlr_output *output, bool enable) {
|
void wlr_output_enable(struct wlr_output *output, bool enable) {
|
||||||
|
|
Loading…
Reference in New Issue