diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-14 08:37:50 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-08-14 08:37:50 -0400 |
commit | de6f32c84e222861c6fed27acab99c568cd6fd66 (patch) | |
tree | 6a6ff388e89d5441df4fcbbefee3d8e9b7b8b31f /include/wlr/render | |
parent | 0de5eed048202f3d05d7300223e9181c585333dd (diff) |
Refactor away wlr_renderer_state
Diffstat (limited to 'include/wlr/render')
-rw-r--r-- | include/wlr/render/interface.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h index b6072bff..59ece8b1 100644 --- a/include/wlr/render/interface.h +++ b/include/wlr/render/interface.h @@ -6,31 +6,29 @@ #include <wlr/types/wlr_output.h> struct wlr_renderer_impl; -struct wlr_renderer_state; struct wlr_renderer { struct wlr_renderer_impl *impl; - struct wlr_renderer_state *state; }; struct wlr_renderer_impl { - void (*begin)(struct wlr_renderer_state *state, struct wlr_output *output); - void (*end)(struct wlr_renderer_state *state); - struct wlr_texture *(*texture_init)(struct wlr_renderer_state *state); - bool (*render_with_matrix)(struct wlr_renderer_state *state, + void (*begin)(struct wlr_renderer *renderer, struct wlr_output *output); + void (*end)(struct wlr_renderer *renderer); + struct wlr_texture *(*texture_init)(struct wlr_renderer *renderer); + bool (*render_with_matrix)(struct wlr_renderer *renderer, struct wlr_texture *texture, const float (*matrix)[16]); - void (*render_quad)(struct wlr_renderer_state *state, + void (*render_quad)(struct wlr_renderer *renderer, const float (*color)[4], const float (*matrix)[16]); - void (*render_ellipse)(struct wlr_renderer_state *state, + void (*render_ellipse)(struct wlr_renderer *renderer, const float (*color)[4], const float (*matrix)[16]); const enum wl_shm_format *(*formats)( - struct wlr_renderer_state *state, size_t *len); - bool (*buffer_is_drm)(struct wlr_renderer_state *state, + struct wlr_renderer *renderer, size_t *len); + bool (*buffer_is_drm)(struct wlr_renderer *renderer, struct wl_resource *buffer); - void (*destroy)(struct wlr_renderer_state *state); + void (*destroy)(struct wlr_renderer *renderer); }; -struct wlr_renderer *wlr_renderer_init(struct wlr_renderer_state *state, +void wlr_renderer_init(struct wlr_renderer *renderer, struct wlr_renderer_impl *impl); struct wlr_texture_impl { |