[PATCH xserver] use xcb struct in render
Julien Cristau
jcristau at debian.org
Sun Jan 11 02:30:08 PST 2015
Hi Jaya,
On Sat, Jan 10, 2015 at 00:57:42 +0530, Jaya Tiwari wrote:
> Replacing manually written proto headers for render extension with xcb
> generated structs
> Have changed simple requests without list/switch and replies
>
> Signed-off-by: Jaya Tiwari <tiwari.jaya18 at gmail.com>
> ---
> render/render.c | 173 ++++++++++++++++++++++++++----
> --------------------------
> 1 file changed, 80 insertions(+), 93 deletions(-)
>
the patch is word-wrapped, so can't apply. please make sure your mailer
doesn't do that, or use git send-email.
> diff --git a/render/render.c b/render/render.c
> index 723f380..e91de3c 100644
> --- a/render/render.c
> +++ b/render/render.c
> @@ -16,7 +16,7 @@
> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
> * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
> * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
> * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> *
> * Author: Keith Packard, SuSE, Inc.
what's this hunk?
> @@ -41,6 +41,7 @@
> #include "servermd.h"
> #include <X11/extensions/render.h>
> #include <X11/extensions/renderproto.h>
> +#include <xcb/render.h>
> #include "picturestr.h"
> #include "glyphstr.h"
> #include <X11/Xfuncproto.h>
As a side note, I wonder if xcb shouldn't split its headers between the
protocol structures on one side, and the client library bits on the
other.
> @@ -276,11 +277,11 @@ ProcRenderQueryVersion(ClientPtr client)
>
> REQUEST(xRenderQueryVersionReq);
>
> - REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
> -
> pRenderClient->major_version = stuff->majorVersion;
> pRenderClient->minor_version = stuff->minorVersion;
>
> + REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
> +
> if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
> (SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION)) {
> rep.majorVersion = stuff->majorVersion;
this is wrong, you can't access stuff before making sure it's within
bounds.
[...]
> @@ -1995,7 +1996,7 @@ static int
> SProcRenderQueryVersion(ClientPtr client)
> {
> REQUEST(xRenderQueryVersionReq);
> - REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
> +
> swaps(&stuff->length);
> swapl(&stuff->majorVersion);
> swapl(&stuff->minorVersion);
again this is wrong (ditto for a number of others).
Cheers,
Julien
More information about the xorg-devel
mailing list