[Mesa-dev] [PATCH v2 1/2] egl/drm: Fix misused x and y offsets on swrast_put_image2() (v2)

Daniel Stone daniel at fooishbar.org
Wed Jul 19 13:43:48 UTC 2017


Hi Eric,

On 19 July 2017 at 14:41, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> On Wednesday, 2017-07-19 12:00:20 +0100, Daniel Stone wrote:
>> We can also check (x+width) against
>> bo->base.width, and (y+height) against bo->base.height, rather than
>> using bytes as a unit. But it would be good to understand where the
>> real problem comes from first.
>
> We still need the byte values for the memcpy() and `dst`.

Yeah, that part makes sense. It's just that I think co-ordinates are
best checked against co-ordinates, rather than doing an intermediate
conversion to bytes. Keeping the local variables for byte counting
makes sense, but if the check is retained, I'd prefer to see it as a
pure co-ordinate comparison.

Cheers,
Daniel


More information about the mesa-dev mailing list