mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-24 08:02:21 +00:00
util/transform: move over wl_output_transform helpers
These aren't really tied to wlr_output.
This commit is contained in:
parent
a3d22dbe97
commit
9e702e9cfe
@ -19,6 +19,7 @@
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include "backend/drm/drm.h"
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/transform.h>
|
||||
|
||||
/**
|
||||
* A minimal fullscreen-shell server. It only supports rendering.
|
||||
|
@ -729,19 +729,4 @@ bool wlr_output_configure_primary_swapchain(struct wlr_output *output,
|
||||
struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
|
||||
struct wlr_output_state *state, int *buffer_age, struct wlr_render_timer *timer);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the transform that, when composed with `tr`, gives
|
||||
* `WL_OUTPUT_TRANSFORM_NORMAL`.
|
||||
*/
|
||||
enum wl_output_transform wlr_output_transform_invert(
|
||||
enum wl_output_transform tr);
|
||||
|
||||
/**
|
||||
* Returns a transform that, when applied, has the same effect as applying
|
||||
* sequentially `tr_a` and `tr_b`.
|
||||
*/
|
||||
enum wl_output_transform wlr_output_transform_compose(
|
||||
enum wl_output_transform tr_a, enum wl_output_transform tr_b);
|
||||
|
||||
#endif
|
||||
|
28
include/wlr/util/transform.h
Normal file
28
include/wlr/util/transform.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This an unstable interface of wlroots. No guarantees are made regarding the
|
||||
* future consistency of this API.
|
||||
*/
|
||||
#ifndef WLR_USE_UNSTABLE
|
||||
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
||||
#endif
|
||||
|
||||
#ifndef WLR_UTIL_TRANSFORM_H
|
||||
#define WLR_UTIL_TRANSFORM_H
|
||||
|
||||
#include <wayland-server-protocol.h>
|
||||
|
||||
/**
|
||||
* Returns the transform that, when composed with `tr`, gives
|
||||
* `WL_OUTPUT_TRANSFORM_NORMAL`.
|
||||
*/
|
||||
enum wl_output_transform wlr_output_transform_invert(
|
||||
enum wl_output_transform tr);
|
||||
|
||||
/**
|
||||
* Returns a transform that, when applied, has the same effect as applying
|
||||
* sequentially `tr_a` and `tr_b`.
|
||||
*/
|
||||
enum wl_output_transform wlr_output_transform_compose(
|
||||
enum wl_output_transform tr_a, enum wl_output_transform tr_b);
|
||||
|
||||
#endif
|
@ -4,6 +4,7 @@
|
||||
#include <pixman.h>
|
||||
#include <time.h>
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "render/gles2.h"
|
||||
#include "types/wlr_matrix.h"
|
||||
|
||||
|
@ -8,7 +8,6 @@ wlr_files += files(
|
||||
'output/render.c',
|
||||
'output/state.c',
|
||||
'output/swapchain.c',
|
||||
'output/transform.c',
|
||||
'scene/drag_icon.c',
|
||||
'scene/subsurface_tree.c',
|
||||
'scene/surface.c',
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "render/allocator/allocator.h"
|
||||
#include "types/wlr_buffer.h"
|
||||
#include "types/wlr_output.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||
#include <wlr/types/wlr_presentation_time.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "types/wlr_scene.h"
|
||||
|
||||
static void handle_scene_buffer_outputs_update(
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "types/wlr_buffer.h"
|
||||
#include "types/wlr_output.h"
|
||||
#include "types/wlr_scene.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "types/wlr_buffer.h"
|
||||
#include "types/wlr_region.h"
|
||||
#include "types/wlr_subcompositor.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "wlr-screencopy-unstable-v1-protocol.h"
|
||||
#include "render/pixel_format.h"
|
||||
#include "render/wlr_renderer.h"
|
||||
|
@ -11,6 +11,6 @@ wlr_files += files(
|
||||
'shm.c',
|
||||
'time.c',
|
||||
'token.c',
|
||||
'transform.c',
|
||||
'utf8.c',
|
||||
)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/transform.h>
|
||||
|
||||
enum wl_output_transform wlr_output_transform_invert(
|
||||
enum wl_output_transform tr) {
|
Loading…
Reference in New Issue
Block a user