compositor: improve viewport source validity check
If client changes the buffer transform or size and re-commit the surface before surface dirtys buffer (weston_surface_attach), the viewport source validity check may fail. Because the width_from_buffer and height_from_buffer cannot be updated based on new buffer transform. Therefore, add the situation of size dirty (WESTON_SURFACE_DIRTY_SIZE) to source validity check, width_from_buffer and height_from_buffer can be updated in time when the buffer transform and scale change. Signed-off-by: Chao Guo <chao.guo@nxp.com>
This commit is contained in:
parent
b288e662d6
commit
8e0e75999e
|
@ -4305,7 +4305,8 @@ weston_surface_is_pending_viewport_source_valid(
|
||||||
if (vp->buffer.src_width == wl_fixed_from_int(-1))
|
if (vp->buffer.src_width == wl_fixed_from_int(-1))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (pend->status & WESTON_SURFACE_DIRTY_BUFFER) {
|
if ((pend->status & WESTON_SURFACE_DIRTY_BUFFER) ||
|
||||||
|
(pend->status & WESTON_SURFACE_DIRTY_SIZE)) {
|
||||||
if (pend->buffer) {
|
if (pend->buffer) {
|
||||||
convert_size_by_transform_scale(&width_from_buffer,
|
convert_size_by_transform_scale(&width_from_buffer,
|
||||||
&height_from_buffer,
|
&height_from_buffer,
|
||||||
|
|
Loading…
Reference in New Issue