aboutsummaryrefslogtreecommitdiff
path: root/libXrender/src/Xrender.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 15:05:45 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 15:05:45 +0200
commit4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8 (patch)
tree3ddf28be6916dd5ea27837431b5be8c94017cd9a /libXrender/src/Xrender.c
parent5564e91e3cf4ba5cb2fbebbc2d63d18f588016b8 (diff)
parent5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (diff)
downloadvcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.gz
vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.bz2
vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'libXrender/src/Xrender.c')
-rw-r--r--libXrender/src/Xrender.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/libXrender/src/Xrender.c b/libXrender/src/Xrender.c
index c7630766f..769503a6a 100644
--- a/libXrender/src/Xrender.c
+++ b/libXrender/src/Xrender.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
+ * 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.
@@ -38,7 +38,7 @@ static int XRenderCloseDisplay (Display *dpy, XExtCodes *codes);
* XextFindDisplay.)
*/
static XRenderExtDisplayInfo *
-XRenderExtFindDisplay (XRenderExtInfo *extinfo,
+XRenderExtFindDisplay (XRenderExtInfo *extinfo,
Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo;
@@ -46,7 +46,7 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
/*
* see if this was the most recently accessed display
*/
- if ((dpyinfo = extinfo->cur) && dpyinfo->display == dpy)
+ if ((dpyinfo = extinfo->cur) && dpyinfo->display == dpy)
return dpyinfo;
/*
@@ -70,8 +70,8 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
* any screen, tell the application that Render is not present.
*/
-#define DEPTH_MASK(d) (1 << ((d) - 1))
-
+#define DEPTH_MASK(d) (1U << ((d) - 1))
+
/*
* Render requires support for depth 1, 4, 8, 24 and 32 pixmaps
*/
@@ -81,7 +81,7 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
DEPTH_MASK(8) | \
DEPTH_MASK(24) | \
DEPTH_MASK(32))
-
+
typedef struct _DepthCheckRec {
struct _DepthCheckRec *next;
Display *dpy;
@@ -204,11 +204,11 @@ XRenderExtAddDisplay (XRenderExtInfo *extinfo,
dpyinfo->codes = NULL;
/*
- * if the server has the extension, then we can initialize the
+ * if the server has the extension, then we can initialize the
* appropriate function vectors
*/
if (dpyinfo->codes) {
- XESetCloseDisplay (dpy, dpyinfo->codes->extension,
+ XESetCloseDisplay (dpy, dpyinfo->codes->extension,
XRenderCloseDisplay);
} else {
/* The server doesn't have this extension.
@@ -241,7 +241,7 @@ XRenderExtAddDisplay (XRenderExtInfo *extinfo,
* XRenderExtRemoveDisplay - remove the indicated display from the
* extension object. (Replaces XextRemoveDisplay.)
*/
-static int
+static int
XRenderExtRemoveDisplay (XRenderExtInfo *extinfo, Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo, *prev;
@@ -285,7 +285,7 @@ XRenderFindDisplay (Display *dpy)
dpyinfo = XRenderExtFindDisplay (&XRenderExtensionInfo, dpy);
if (!dpyinfo)
- dpyinfo = XRenderExtAddDisplay (&XRenderExtensionInfo, dpy,
+ dpyinfo = XRenderExtAddDisplay (&XRenderExtensionInfo, dpy,
XRenderExtensionName);
return dpyinfo;
}
@@ -295,10 +295,10 @@ XRenderCloseDisplay (Display *dpy, XExtCodes *codes)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
if (info && info->info) XFree (info->info);
-
+
return XRenderExtRemoveDisplay (&XRenderExtensionInfo, dpy);
}
-
+
/****************************************************************************
* *
* Render public interfaces *
@@ -331,8 +331,8 @@ Status XRenderQueryVersion (Display *dpy,
if (!XRenderQueryFormats (dpy))
return 0;
-
- xri = info->info;
+
+ xri = info->info;
*major_versionp = xri->major_version;
*minor_versionp = xri->minor_version;
return 1;
@@ -342,7 +342,7 @@ static XRenderPictFormat *
_XRenderFindFormat (XRenderInfo *xri, PictFormat format)
{
int nf;
-
+
for (nf = 0; nf < xri->nformat; nf++)
if (xri->format[nf].id == format)
return &xri->format[nf];
@@ -360,7 +360,7 @@ typedef struct _renderVersionState {
Bool error;
int major_version;
int minor_version;
-
+
} _XrenderVersionState;
static Bool
@@ -413,7 +413,7 @@ XRenderQueryFormats (Display *dpy)
int nf, ns, nd, nv;
int rlength;
int nbytes;
-
+
RenderCheckExtension (dpy, info, 0);
LockDisplay (dpy);
if (info->info)
@@ -426,19 +426,19 @@ XRenderQueryFormats (Display *dpy)
vreq->renderReqType = X_RenderQueryVersion;
vreq->majorVersion = RENDER_MAJOR;
vreq->minorVersion = RENDER_MINOR;
-
+
async_state.version_seq = dpy->request;
async_state.error = False;
async.next = dpy->async_handlers;
async.handler = _XRenderVersionHandler;
async.data = (XPointer) &async_state;
dpy->async_handlers = &async;
-
+
GetReq (RenderQueryPictFormats, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderQueryPictFormats;
-
- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
+
+ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
DeqAsyncHandler (dpy, &async);
UnlockDisplay (dpy);
@@ -457,7 +457,7 @@ XRenderQueryFormats (Display *dpy)
*/
if (async_state.major_version == 0 && async_state.minor_version < 6)
rep.numSubpixel = 0;
-
+
xri = (XRenderInfo *) Xmalloc (sizeof (XRenderInfo) +
rep.numFormats * sizeof (XRenderPictFormat) +
rep.numScreens * sizeof (XRenderScreen) +
@@ -470,7 +470,7 @@ XRenderQueryFormats (Display *dpy)
rep.numSubpixel * 4);
xData = (void *) Xmalloc (rlength);
nbytes = (int) rep.length << 2;
-
+
if (!xri || !xData || nbytes < rlength)
{
if (xri) Xfree (xri);
@@ -538,7 +538,7 @@ XRenderQueryFormats (Display *dpy)
xDepth = (xPictDepth *) xVisual;
}
screen++;
- xScreen = (xPictScreen *) xDepth;
+ xScreen = (xPictScreen *) xDepth;
}
xSubpixel = (CARD32 *) xScreen;
screen = xri->screen;
@@ -554,7 +554,7 @@ XRenderQueryFormats (Display *dpy)
*/
if (nbytes > rlength)
_XEatData (dpy, (unsigned long) (nbytes - rlength));
-
+
UnlockDisplay (dpy);
SyncHandle ();
Xfree (xData);
@@ -696,7 +696,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRed |
PictFormatRedMask |
@@ -725,7 +725,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRed |
PictFormatRedMask |
@@ -753,7 +753,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
@@ -779,7 +779,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
@@ -805,7 +805,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
@@ -816,7 +816,7 @@ XRenderFindStandardFormat (Display *dpy,
};
if (0 <= format && format < PictStandardNUM)
- return XRenderFindFormat (dpy,
+ return XRenderFindFormat (dpy,
standardFormats[format].mask,
&standardFormats[format].templ,
0);
@@ -870,7 +870,7 @@ XRenderQueryPictIndexValues(Display *dpy,
for(i = 0; i < rep.numIndexValues; i++)
{
xIndexValue value;
-
+
_XRead (dpy, (char *) &value, SIZEOF (xIndexValue));
values[i].pixel = value.pixel;
values[i].red = value.red;