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
|
|
@ -44,9 +44,10 @@ static bool check_stride(const struct wlr_pixel_format_info *fmt,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool gles2_texture_update_from_buffer(struct wlr_texture *wlr_texture,
|
||||
struct wlr_buffer *buffer, pixman_region32_t *damage) {
|
||||
static bool gles2_texture_update_from_raster(struct wlr_texture *wlr_texture,
|
||||
struct wlr_raster *raster, pixman_region32_t *damage) {
|
||||
struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
|
||||
struct wlr_buffer *buffer = raster->buffer;
|
||||
|
||||
if (texture->target != GL_TEXTURE_2D || texture->image != EGL_NO_IMAGE_KHR) {
|
||||
return false;
|
||||
|
|
@ -178,7 +179,7 @@ static void gles2_texture_unref(struct wlr_texture *wlr_texture) {
|
|||
}
|
||||
|
||||
static const struct wlr_texture_impl texture_impl = {
|
||||
.update_from_buffer = gles2_texture_update_from_buffer,
|
||||
.update_from_raster = gles2_texture_update_from_raster,
|
||||
.destroy = gles2_texture_unref,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue