mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
wlr_raster: Add surface helper
This commit is contained in:
parent
d9f6ec080f
commit
46b0ba0da6
2 changed files with 150 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ struct wlr_buffer;
|
|||
struct wlr_texture;
|
||||
struct wlr_renderer;
|
||||
struct wlr_drm_syncobj_timeline;
|
||||
struct wlr_surface;
|
||||
|
||||
struct wlr_raster {
|
||||
// May be NULL
|
||||
|
|
@ -83,4 +84,12 @@ void wlr_raster_unlock(struct wlr_raster *raster);
|
|||
struct wlr_texture *wlr_raster_obtain_texture(struct wlr_raster *raster,
|
||||
struct wlr_renderer *renderer);
|
||||
|
||||
/**
|
||||
* Creates a wlr_raster from a surface. This will automatically deduplicate
|
||||
* rasters if multiple are consumed from the same surface so that redundant
|
||||
* uploads are not performed. The raster returned will automatically be locked.
|
||||
* Users are required to call wlr_raster_unlock() after invoking this function.
|
||||
*/
|
||||
struct wlr_raster *wlr_raster_from_surface(struct wlr_surface *surface);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue