mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Merge pull request #902 from emersion/various-memory-leaks
Various memory leaks
This commit is contained in:
commit
fecb971518
12 changed files with 120 additions and 51 deletions
|
|
@ -11,12 +11,6 @@
|
|||
#include <wlr/types/wlr_linux_dmabuf.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
||||
struct wlr_renderer_impl;
|
||||
|
||||
struct wlr_renderer {
|
||||
const struct wlr_renderer_impl *impl;
|
||||
};
|
||||
|
||||
struct wlr_renderer_impl {
|
||||
void (*begin)(struct wlr_renderer *renderer, uint32_t width,
|
||||
uint32_t height);
|
||||
|
|
|
|||
|
|
@ -6,9 +6,15 @@
|
|||
#include <wlr/render/wlr_texture.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
|
||||
struct wlr_output;
|
||||
struct wlr_renderer_impl;
|
||||
|
||||
struct wlr_renderer;
|
||||
struct wlr_renderer {
|
||||
const struct wlr_renderer_impl *impl;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
};
|
||||
|
||||
void wlr_renderer_begin(struct wlr_renderer *r, int width, int height);
|
||||
void wlr_renderer_end(struct wlr_renderer *r);
|
||||
|
|
|
|||
|
|
@ -9,13 +9,15 @@ struct wlr_surface;
|
|||
struct wlr_subcompositor {
|
||||
struct wl_global *wl_global;
|
||||
struct wl_list wl_resources;
|
||||
struct wl_list subsurface_resources;
|
||||
};
|
||||
|
||||
struct wlr_compositor {
|
||||
struct wl_global *wl_global;
|
||||
struct wl_list wl_resources;
|
||||
struct wlr_renderer *renderer;
|
||||
struct wl_list surfaces;
|
||||
struct wl_list surface_resources;
|
||||
struct wl_list region_resources;
|
||||
|
||||
struct wlr_subcompositor subcompositor;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ struct wl_resource;
|
|||
/*
|
||||
* Implements the given resource as region.
|
||||
*/
|
||||
void wlr_region_create(struct wl_client *client, struct wl_resource *res,
|
||||
uint32_t id);
|
||||
struct wl_resource *wlr_region_create(struct wl_client *client, uint32_t id);
|
||||
|
||||
pixman_region32_t *wlr_region_from_resource(struct wl_resource *resource);
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ struct wlr_surface {
|
|||
// wlr_subsurface::parent_pending_link
|
||||
struct wl_list subsurface_pending_list;
|
||||
|
||||
struct wl_listener renderer_destroy;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
|
@ -121,7 +123,7 @@ bool wlr_surface_has_buffer(struct wlr_surface *surface);
|
|||
/**
|
||||
* Create the subsurface implementation for this surface.
|
||||
*/
|
||||
void wlr_surface_make_subsurface(struct wlr_surface *surface,
|
||||
struct wlr_subsurface *wlr_surface_make_subsurface(struct wlr_surface *surface,
|
||||
struct wlr_surface *parent, uint32_t id);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue