On 25/04/2015 22:53, Ilia Mirkin wrote :
On Fri, Apr 24, 2015 at 4:11 PM, Axel Davy <axel.d...@ens.fr> wrote:
+ if (damaged) {
+ box = *damaged;
+ box.z = This->layer;
+ box.depth = 1;
+ } else {
+ box.x = 0;
+ box.y = 0;
+ box.z = This->layer;
+ box.width = This->desc.Width;
+ box.height = This->desc.Height;
+ box.depth = 1;
+ }
Might I suggest
if (damaged)
box = *damaged;
else
u_box_2d(0, 0, This->desc.Width, This->desc.Height, &box);
box.z = This->layer;
box.depth = 1;
I have no strong opinion on that, but I get the impression the version
without u_box_2d is clearer for the reader, as we see exactly which/how
the fields are set.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev