On Fri, 20 Jul 2018 12:26:22 +0100 Daniel Stone <[email protected]> wrote:
> Hi Deepak, > > On Fri, 20 Jul 2018 at 12:21, Deepak Singh Rawat <[email protected]> wrote: > > In brief the damage is in frame-buffer coordinate of attached fb to the > > plane. > > Unlike plane src coordinates, damage clips are not in 16.16 fixed point. > > Damage > > during page flip is helpful for some drivers like vmwgfx where each > > framebuffer > > change needs to be transmitted over network, usb, etc. > > > > Now that I have some code ready and got it working for vmwgfx driver, the > > next step is to change weston to send damage during page flip. With my > > current > > understanding of weston I think the damage received during > > weston_output.repaint() is exactly what I am looking for ? Does this damage > > region during weston_output.repaint() is in frame-buffer coordinate ? > > The damage region received during output repaint is in Weston's global > co-ordinate space. To shift to CRTC co-ordinates, you need to > translate the damage region by (-output->x, -output->y). When we are > using the renderer, there is no scaling, so CRTC co-ordinates and > framebuffer co-ordinates are guaranteed to be equal. This only > accounts for the primary plane; damage to views on other planes is > considered separately. Hi, that explanation misses the output transform and scale, which need to be taken into account when converting from the global damage space into the framebuffer damage space. To see how to get the renderer damage in framebuffer coordinates, see gl_renderer_repaint_output() and how the path using swap_buffers_with_damage works. Mind, that EGL damage coordinate system might be y-flipped compared to what you need. The pixman renderer has similar code to handle damage and might be easier to follow: region_global_to_output(). Thanks, pq
pgp7mNe2OoimU.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
