mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Make wlr_matrix private API
36cc698bc5 ("matrix: deprecate") has deprecated wlr_matrix more
than one year ago. It's now time to drop it from our public API.
This commit is contained in:
parent
fa97f7f1f0
commit
9b55737cf5
5 changed files with 34 additions and 48 deletions
|
|
@ -1,7 +1,40 @@
|
|||
#ifndef TYPES_WLR_MATRIX_H
|
||||
#define TYPES_WLR_MATRIX_H
|
||||
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wayland-server-protocol.h>
|
||||
|
||||
struct wlr_box;
|
||||
|
||||
/** Writes the identity matrix into mat */
|
||||
void wlr_matrix_identity(float mat[static 9]);
|
||||
|
||||
/** mat ← a × b */
|
||||
void wlr_matrix_multiply(float mat[static 9], const float a[static 9],
|
||||
const float b[static 9]);
|
||||
|
||||
void wlr_matrix_transpose(float mat[static 9], const float a[static 9]);
|
||||
|
||||
/** Writes a 2D translation matrix to mat of magnitude (x, y) */
|
||||
void wlr_matrix_translate(float mat[static 9], float x, float y);
|
||||
|
||||
/** Writes a 2D scale matrix to mat of magnitude (x, y) */
|
||||
void wlr_matrix_scale(float mat[static 9], float x, float y);
|
||||
|
||||
/** Writes a 2D rotation matrix to mat at an angle of rad radians */
|
||||
void wlr_matrix_rotate(float mat[static 9], float rad);
|
||||
|
||||
/** Writes a transformation matrix which applies the specified
|
||||
* wl_output_transform to mat */
|
||||
void wlr_matrix_transform(float mat[static 9],
|
||||
enum wl_output_transform transform);
|
||||
|
||||
/** Shortcut for the various matrix operations involved in projecting the
|
||||
* specified wlr_box onto a given orthographic projection with a given
|
||||
* rotation. The result is written to mat, which can be applied to each
|
||||
* coordinate of the box to get a new coordinate from [-1,1]. */
|
||||
void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box,
|
||||
enum wl_output_transform transform, float rotation,
|
||||
const float projection[static 9]);
|
||||
|
||||
/**
|
||||
* Writes a 2D orthographic projection matrix to mat of (width, height) with a
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* This is a deprecated interface of wlroots. It will be removed in a future
|
||||
* version.
|
||||
*/
|
||||
|
||||
#ifndef WLR_TYPES_WLR_MATRIX_H
|
||||
#define WLR_TYPES_WLR_MATRIX_H
|
||||
|
||||
#include <wayland-server-protocol.h>
|
||||
|
||||
struct wlr_box;
|
||||
|
||||
/** Writes the identity matrix into mat */
|
||||
void wlr_matrix_identity(float mat[static 9]);
|
||||
|
||||
/** mat ← a × b */
|
||||
void wlr_matrix_multiply(float mat[static 9], const float a[static 9],
|
||||
const float b[static 9]);
|
||||
|
||||
void wlr_matrix_transpose(float mat[static 9], const float a[static 9]);
|
||||
|
||||
/** Writes a 2D translation matrix to mat of magnitude (x, y) */
|
||||
void wlr_matrix_translate(float mat[static 9], float x, float y);
|
||||
|
||||
/** Writes a 2D scale matrix to mat of magnitude (x, y) */
|
||||
void wlr_matrix_scale(float mat[static 9], float x, float y);
|
||||
|
||||
/** Writes a 2D rotation matrix to mat at an angle of rad radians */
|
||||
void wlr_matrix_rotate(float mat[static 9], float rad);
|
||||
|
||||
/** Writes a transformation matrix which applies the specified
|
||||
* wl_output_transform to mat */
|
||||
void wlr_matrix_transform(float mat[static 9],
|
||||
enum wl_output_transform transform);
|
||||
|
||||
/** Shortcut for the various matrix operations involved in projecting the
|
||||
* specified wlr_box onto a given orthographic projection with a given
|
||||
* rotation. The result is written to mat, which can be applied to each
|
||||
* coordinate of the box to get a new coordinate from [-1,1]. */
|
||||
void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box,
|
||||
enum wl_output_transform transform, float rotation,
|
||||
const float projection[static 9]);
|
||||
|
||||
#endif
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <wlr/render/drm_syncobj.h>
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "render/egl.h"
|
||||
#include "render/gles2.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <wlr/render/egl.h>
|
||||
#include <wlr/render/interface.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <xf86drm.h>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <wayland-server-protocol.h>
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include "types/wlr_matrix.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue