mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
wlr_texture: Update wlr_texture_update_from_buffer to use wlr_raster
In the future, these implementations can use compatible texture sources to do fast blit instead.
This commit is contained in:
parent
1e2af8665b
commit
beaede2df0
5 changed files with 23 additions and 23 deletions
|
|
@ -14,7 +14,6 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_raster.h>
|
||||
|
||||
struct wlr_buffer;
|
||||
struct wlr_renderer;
|
||||
struct wlr_texture_impl;
|
||||
|
||||
|
|
@ -27,17 +26,17 @@ struct wlr_texture {
|
|||
};
|
||||
|
||||
/**
|
||||
* Update a texture with a struct wlr_buffer's contents.
|
||||
* Update a texture with a struct wlr_raster's contents.
|
||||
*
|
||||
* The update might be rejected (in case the texture is immutable, the buffer
|
||||
* has an unsupported type/format, etc), so callers must be prepared to fall
|
||||
* back to re-creating the texture from scratch via wlr_texture_from_buffer().
|
||||
* The update might be rejected (in case the texture is immutable, the raster
|
||||
* doesn't have a compatible source, unsupported type/format, etc), so callers
|
||||
* must be prepared to fall back.
|
||||
*
|
||||
* The damage can be used by the renderer as an optimization: only the supplied
|
||||
* region needs to be updated.
|
||||
*/
|
||||
bool wlr_texture_update_from_buffer(struct wlr_texture *texture,
|
||||
struct wlr_buffer *buffer, pixman_region32_t *damage);
|
||||
bool wlr_texture_update_from_raster(struct wlr_texture *texture,
|
||||
struct wlr_raster *raster, pixman_region32_t *damage);
|
||||
|
||||
/**
|
||||
* Destroys the texture.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue