wlr_renderer: Introduce wlr_renderer_raster_upload

This commit is contained in:
Alexander Orzechowski 2022-06-24 23:14:12 -04:00
parent 5dd7c00a7c
commit d8def1aa65
10 changed files with 198 additions and 67 deletions

View file

@ -27,6 +27,8 @@ struct wlr_renderer_impl {
void (*end)(struct wlr_renderer *renderer);
void (*clear)(struct wlr_renderer *renderer, const float color[static 4]);
void (*scissor)(struct wlr_renderer *renderer, struct wlr_box *box);
bool (*raster_upload)(struct wlr_renderer *renderer,
struct wlr_raster *raster);
bool (*render_subtexture_with_matrix)(struct wlr_renderer *renderer,
struct wlr_texture *texture, const struct wlr_fbox *box,
const float matrix[static 9], float alpha);

View file

@ -48,6 +48,14 @@ void wlr_renderer_clear(struct wlr_renderer *r, const float color[static 4]);
* box.
*/
void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box);
/**
* The renderer will attempt to upload the raster using an available compatible
* source found in the raster to the device that the renderer is running on.
* If the raster is already uploaded to said device, then this is a no-op.
*/
bool wlr_renderer_raster_upload(struct wlr_renderer *r,
struct wlr_raster *raster);
/**
* Renders the requested texture.
*/