Skip to content

Commit

Permalink
Moved fx_renderer creation func into scenefx dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed Jan 7, 2024
1 parent 3e61084 commit 3bdb35c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 0 additions & 2 deletions include/render/fx_renderer/fx_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ struct fx_render_timer *fx_get_render_timer(
struct fx_texture *fx_get_texture(
struct wlr_texture *wlr_texture);

struct wlr_renderer *fx_renderer_create_with_drm_fd(int drm_fd);
struct wlr_renderer *fx_renderer_create(struct wlr_backend *backend);
struct wlr_renderer *fx_renderer_create_egl(struct wlr_egl *egl);

struct wlr_egl *wlr_fx_renderer_get_egl(struct wlr_renderer *renderer);
Expand Down
9 changes: 9 additions & 0 deletions include/scenefx/fx_renderer/fx_renderer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef SCENEFX_FX_OPENGL_H
#define SCENEFX_FX_OPENGL_H

#include <wlr/backend.h>

struct wlr_renderer *fx_renderer_create_with_drm_fd(int drm_fd);
struct wlr_renderer *fx_renderer_create(struct wlr_backend *backend);

#endif
5 changes: 3 additions & 2 deletions render/fx_renderer/fx_renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
#include <wlr/util/log.h>

#include "render/egl.h"
#include "render/pixel_format.h"
#include "render/fx_renderer/util.h"
#include "render/fx_renderer/fx_renderer.h"
#include "scenefx/fx_renderer/fx_renderer.h"
#include "render/fx_renderer/matrix.h"
#include "render/fx_renderer/util.h"
#include "render/pixel_format.h"
#include "util/time.h"

static const GLfloat verts[] = {
Expand Down
5 changes: 0 additions & 5 deletions render/fx_renderer/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <string.h>
#include <wlr/types/wlr_output.h>

#include "config.h"
#include "render/fx_renderer/matrix.h"

static const float transforms[][9] = {
Expand Down Expand Up @@ -48,8 +47,6 @@ static const float transforms[][9] = {
},
};

#if !HAVE_WLROOTS_SUBPROJECT

void matrix_projection(float mat[static 9], int width, int height,
enum wl_output_transform transform) {
memset(mat, 0, sizeof(*mat) * 9);
Expand All @@ -71,5 +68,3 @@ void matrix_projection(float mat[static 9], int width, int height,
// Identity
mat[8] = 1.0f;
}

#endif /* ifndef HAVE_WLROOTS_SUBPROJECT */
3 changes: 1 addition & 2 deletions tinywl/tinywl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <scenefx/fx_renderer/fx_renderer.h>
#include <scenefx/types/fx/shadow_data.h>
#include <scenefx/types/wlr_scene.h>
#include <unistd.h>
Expand All @@ -28,8 +29,6 @@
#include <wlr/util/log.h>
#include <xkbcommon/xkbcommon.h>

#include "render/fx_renderer/fx_renderer.h"

/* For brevity's sake, struct members are annotated where they are used. */
enum tinywl_cursor_mode {
TINYWL_CURSOR_PASSTHROUGH,
Expand Down

0 comments on commit 3bdb35c

Please sign in to comment.