On Fri, 20 Nov 2015 20:37:58 -0600 Derek Foreman <der...@osg.samsung.com> wrote:
> On 20/11/15 07:39 PM, Bill Spitzak wrote: > > I am pretty certain you can just convert wl_surface.damage coordinates > > *to* buffer coordinates, using the transform the old buffer was attached > > with, and thus merge all the wl_surface.damage and > > wl_surface.damage_buffer into a single region in buffer space. wl_surface.damage is defined to be in the *new* surface coordinates, not the old surface coordinates, so conversion before knowing all the transformation parameters will go wrong. You also cannot know if the pending parameters at hand will be the final ones at commit. There is no such thing as: damage in one coordinate system, update parameters, damage in new coordinate system, update parameters, damage in yet one more coordinate system, commit. No. Everything that goes between two commits will be considered atomically with the final state when applying: parameters get replaced if re-sent, damage accumulates in both coordinate systems separately. The mapping between the two coordinate systems is unknown until commit. Before a client can even start redrawing and emitting damage to the compositor, it has to have locked down the surface-buffer transformation parameters it is going to use. It makes no difference whether the parameters are sent to the compositor as the first or the last thing before commit. > Yep, that should be fine. We have all the code to do that already since > we previously stored damage in surface co-ords exclusively and gl > texture uploads needed buffer co-ordinates. GL texture uploads happen at compositor repaint time, which means the final commit has been processed long ago. Textures are not uploaded from the attach request handler. This means that the upload is guaranteed to have the final committed transformation parameters. Thanks, pq
pgp0Firz4qoV7.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel