-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wl: Fix the validation of the exported image in outputs with scale factor #637
Conversation
I tested this locally and doesn't work, the surface never gets a buffer attached. The end of the log with
So it never considers that the surface geometry matches the exported image size. |
…ctor The patch fixes a basic logic bug inside of the on_export_wl_egl_image(). The error is in the incorrect use of scale_factor (actually defined for the WebPage zooming) instead of the current_output->scale for validating the exported image geometry. The change also unifies inside of the new validate_exported_geometry() function the shared code used for validating the sizes of the exported images. This fixes regression added in e533fce. Thanks to Adrian Perez de Castro <[email protected]> for reporting the issue.
The device scale factor could be different and the scale of the exported image should be also updated.
640ad32
to
a39d663
Compare
your are right. I noticed that also in a second round of tests. The second commit should fix this situation. The problem is, because we set the scale factor in the view backend in the View resize action, then we need to force a view resize every time the output scale handler is called. This guarantee the exported image is generated according the expected output scale factor. |
Tested, this now works flawlessly. Thanks! |
Awesome. Thanks for ✅✅. Rebasing and merging. |
The patch fixes a basic logic bug inside of the
on_export_wl_egl_image()
. The error is in the incorrect use of scale_factor (actually defined for the WebPage zooming) instead of thecurrent_output->scale
for validating the exported image geometry.The change also unifies inside of the new
validate_exported_geometry()
function the shared code used for validating the sizes of the exported images.This fixes regression added in e533fce.
Thanks to Adrian Perez de Castro [email protected] for reporting the issue.