[Mesa-dev] [PATCH 1/2] glapi/glx: Simplify __glXReadPixelReply
Ian Romanick
idr at freedesktop.org
Thu Jul 19 09:39:26 PDT 2012
On 07/19/2012 07:46 AM, Julien Cristau wrote:
> From: Julien Cristau <julien.cristau at logilab.fr>
>
> Doing
> size = reply.length * 4;
> [...]
> extra = 4 - (size & 3);
>
> is useless, size & 3 will always be 0.
>
> Signed-off-by: Julien Cristau <julien.cristau at logilab.fr>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mapi/glapi/gen/glX_proto_send.py | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
> index bec0222..9068a61 100644
> --- a/src/mapi/glapi/gen/glX_proto_send.py
> +++ b/src/mapi/glapi/gen/glX_proto_send.py
> @@ -246,12 +246,7 @@ __glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim,
> __glXSetError(gc, GL_OUT_OF_MEMORY);
> }
> else {
> - const GLint extra = 4 - (size & 3);
> -
> _XRead(dpy, buf, size);
> - if ( extra < 4 ) {
> - _XEatData(dpy, extra);
> - }
>
> __glEmptyImage(gc, 3, width, height, depth, format, type,
> buf, dest);
>
More information about the mesa-dev
mailing list