[Mesa-dev] [PATCH 03/11] st/nine: Simplify Surface9 Managed resources implementation
Ilia Mirkin
imirkin at alum.mit.edu
Sat Apr 25 13:53:55 PDT 2015
On Fri, Apr 24, 2015 at 4:11 PM, Axel Davy <axel.davy at 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;
More information about the mesa-dev
mailing list