mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
egl/wayland/sw: fix no-op updating of current backbuffer
if the frontbuffer is the backbuffer then its contents are up-to-date Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
This commit is contained in:
parent
75cf82005d
commit
d90b14c768
1 changed files with 3 additions and 1 deletions
|
|
@ -2432,12 +2432,14 @@ dri2_wl_swrast_get_image(__DRIdrawable *read, int x, int y, int w, int h,
|
|||
char *src, *dst;
|
||||
|
||||
src = dri2_wl_swrast_get_frontbuffer_data(dri2_surf);
|
||||
/* this is already the most up-to-date buffer */
|
||||
if (src == data)
|
||||
return;
|
||||
if (!src) {
|
||||
memset(data, 0, copy_width * h);
|
||||
return;
|
||||
}
|
||||
|
||||
assert(data != src);
|
||||
assert(copy_width <= src_stride);
|
||||
|
||||
src += x_offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue