xserver: Branch 'master' - 9 commits
Keith Packard
keithp at kemper.freedesktop.org
Wed Aug 21 12:24:43 PDT 2013
hw/kdrive/ephyr/ephyrdri.c | 5 +++--
hw/kdrive/ephyr/ephyrdri.h | 2 +-
hw/kdrive/ephyr/ephyrdriext.c | 23 +++++------------------
hw/kdrive/ephyr/ephyrhostglx.c | 2 --
hw/kdrive/ephyr/ephyrhostvideo.c | 38 +++++++++++++++++++-------------------
hw/kdrive/ephyr/ephyrinit.c | 4 ++--
hw/kdrive/ephyr/hostx.c | 2 +-
hw/kdrive/ephyr/hostx.h | 2 +-
hw/kdrive/ephyr/os.c | 2 +-
hw/kdrive/linux/evdev.c | 2 +-
hw/kdrive/linux/linux.c | 2 +-
hw/kdrive/linux/mouse.c | 6 +++---
hw/kdrive/linux/ps2.c | 2 +-
hw/kdrive/src/kdrive.c | 6 +++---
hw/kdrive/src/kdrive.h | 13 +++++++------
hw/kdrive/src/kinput.c | 11 ++---------
16 files changed, 51 insertions(+), 71 deletions(-)
New commits:
commit e01a3f65d3e6d92f92ef2992b338cc9625bde082
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 14:50:37 2013 +0200
ephyr: Fix warning about XID vs unsigned long * by changing function args
There's no reason to pass the data back out to the caller, since the
caller was dropping it on the floor. The original data is a CARD32,
so no need to mess with weird unsigned longs.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/ephyr/ephyrdri.c b/hw/kdrive/ephyr/ephyrdri.c
index 5055436..3a4a063 100644
--- a/hw/kdrive/ephyr/ephyrdri.c
+++ b/hw/kdrive/ephyr/ephyrdri.c
@@ -137,18 +137,19 @@ ephyrDRIGetClientDriverName(int a_screen,
Bool
ephyrDRICreateContext(int a_screen,
int a_visual_id,
- XID *a_returned_ctxt_id, drm_context_t * a_hw_ctxt)
+ CARD32 ctxt_id, drm_context_t * a_hw_ctxt)
{
Display *dpy = hostx_get_display();
Bool is_ok = FALSE;
Visual v;
+ XID returned_ctxt_id = ctxt_id;
EPHYR_LOG("enter. screen:%d, visual:%d\n", a_screen, a_visual_id);
memset(&v, 0, sizeof(v));
v.visualid = a_visual_id;
is_ok = XF86DRICreateContext(dpy,
DefaultScreen(dpy),
- &v, a_returned_ctxt_id, a_hw_ctxt);
+ &v, &returned_ctxt_id, a_hw_ctxt);
EPHYR_LOG("leave:%d\n", is_ok);
return is_ok;
}
diff --git a/hw/kdrive/ephyr/ephyrdri.h b/hw/kdrive/ephyr/ephyrdri.h
index d28910f..8f2d302 100644
--- a/hw/kdrive/ephyr/ephyrdri.h
+++ b/hw/kdrive/ephyr/ephyrdri.h
@@ -43,7 +43,7 @@ Bool ephyrDRIGetClientDriverName(int a_screen,
char **a_client_driver_name);
Bool ephyrDRICreateContext(int a_screen,
int a_visual_id,
- XID *a_returned_ctx_id, drm_context_t * a_hw_ctx);
+ CARD32 ctx_id, drm_context_t * a_hw_ctx);
Bool ephyrDRIDestroyContext(int a_screen, int a_context_id);
Bool ephyrDRICreateDrawable(int a_screen,
int a_drawable, drm_drawable_t * a_hw_drawable);
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 4db40e3..617ffb1 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -716,7 +716,6 @@ ProcXF86DRICreateContext(register ClientPtr client)
ScreenPtr pScreen;
VisualPtr visual;
int i = 0;
- unsigned long context_id = 0;
REQUEST(xXF86DRICreateContextReq);
REQUEST_SIZE_MATCH(xXF86DRICreateContextReq);
@@ -739,10 +738,9 @@ ProcXF86DRICreateContext(register ClientPtr client)
return BadValue;
}
- context_id = stuff->context;
if (!ephyrDRICreateContext(stuff->screen,
stuff->visual,
- &context_id,
+ stuff->context,
(drm_context_t *) &rep.hHWContext)) {
return BadValue;
}
commit f1cefe020bd21c07dfcc9f204e79939499abbd35
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 14:38:08 2013 +0200
ephyr: Drop is_ok logging.
The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it
fixes set-but-unused compiler warnings.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 144c6e1..4db40e3 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -189,7 +189,6 @@ static void
ephyrDRIMoveWindow(WindowPtr a_win,
int a_x, int a_y, WindowPtr a_siblings, VTKind a_kind)
{
- Bool is_ok = FALSE;
ScreenPtr screen = NULL;
EphyrDRIScreenPrivPtr screen_priv = NULL;
EphyrDRIWindowPrivPtr win_priv = NULL;
@@ -214,18 +213,16 @@ ephyrDRIMoveWindow(WindowPtr a_win,
EPHYR_LOG("window: %p\n", a_win);
if (!a_win->parent) {
EPHYR_LOG("cannot move root window\n");
- is_ok = TRUE;
- goto out;
+ return;
}
win_priv = GET_EPHYR_DRI_WINDOW_PRIV(a_win);
if (!win_priv) {
EPHYR_LOG("not a DRI peered window\n");
- is_ok = TRUE;
- goto out;
+ return;
}
if (!findWindowPairFromLocal(a_win, &pair) || !pair) {
EPHYR_LOG_ERROR("failed to get window pair\n");
- goto out;
+ return;
}
/*compute position relative to parent window */
x = a_win->drawable.x - a_win->parent->drawable.x;
@@ -237,11 +234,6 @@ ephyrDRIMoveWindow(WindowPtr a_win,
geo.width = a_win->drawable.width;
geo.height = a_win->drawable.height;
hostx_set_window_geometry(pair->remote, &geo);
- is_ok = TRUE;
-
- out:
- EPHYR_LOG("leave. is_ok:%d\n", is_ok);
- /*do cleanup here */
}
static Bool
@@ -297,7 +289,6 @@ ephyrDRIPositionWindow(WindowPtr a_win, int a_x, int a_y)
static void
ephyrDRIClipNotify(WindowPtr a_win, int a_x, int a_y)
{
- Bool is_ok = FALSE;
ScreenPtr screen = NULL;
EphyrDRIScreenPrivPtr screen_priv = NULL;
EphyrDRIWindowPrivPtr win_priv = NULL;
@@ -323,7 +314,6 @@ ephyrDRIClipNotify(WindowPtr a_win, int a_x, int a_y)
win_priv = GET_EPHYR_DRI_WINDOW_PRIV(a_win);
if (!win_priv) {
EPHYR_LOG("not a DRI peered window\n");
- is_ok = TRUE;
goto out;
}
if (!findWindowPairFromLocal(a_win, &pair) || !pair) {
@@ -343,9 +333,8 @@ ephyrDRIClipNotify(WindowPtr a_win, int a_x, int a_y)
* push the clipping region of this window
* to the peer window in the host
*/
- is_ok = hostx_set_window_bounding_rectangles
+ hostx_set_window_bounding_rectangles
(pair->remote, rects, RegionNumRects(&a_win->clipList));
- is_ok = TRUE;
out:
free(rects);
commit 77c7a2014e3942b55c0b78308edf02eab33f2e60
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 14:36:09 2013 +0200
kdrive: Fix const cast warnings in arguments processing.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index adacac9..9a1dd7d 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -45,7 +45,7 @@ extern KdPointerDriver LinuxEvdevMouseDriver;
extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
#endif
-void processScreenArg(char *screen_size, char *parent_id);
+void processScreenArg(const char *screen_size, char *parent_id);
void
InitCard(char *name)
@@ -134,7 +134,7 @@ ddxUseMsg(void)
}
void
-processScreenArg(char *screen_size, char *parent_id)
+processScreenArg(const char *screen_size, char *parent_id)
{
KdCardInfo *card;
diff --git a/hw/kdrive/ephyr/os.c b/hw/kdrive/ephyr/os.c
index a2a705d..56b52d1 100644
--- a/hw/kdrive/ephyr/os.c
+++ b/hw/kdrive/ephyr/os.c
@@ -28,7 +28,7 @@
#endif
#include "ephyr.h"
-extern void processScreenArg(char *screen_size, char *parent_id);
+extern void processScreenArg(const char *screen_size, char *parent_id);
static int
EphyrInit(void)
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 1899a27..f8949be 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -246,8 +246,8 @@ ddxGiveUp(enum ExitCode error)
Bool kdDumbDriver;
Bool kdSoftCursor;
-char *
-KdParseFindNext(char *cur, const char *delim, char *save, char *last)
+const char *
+KdParseFindNext(const char *cur, const char *delim, char *save, char *last)
{
while (*cur && !strchr(delim, *cur)) {
*save++ = *cur++;
@@ -282,7 +282,7 @@ KdSubRotation(Rotation a, Rotation b)
}
void
-KdParseScreen(KdScreenInfo * screen, char *arg)
+KdParseScreen(KdScreenInfo * screen, const char *arg)
{
char delim;
char save[1024];
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 96787b6..d5d0799 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -411,13 +411,14 @@ Rotation KdAddRotation(Rotation a, Rotation b);
Rotation KdSubRotation(Rotation a, Rotation b);
void
- KdParseScreen(KdScreenInfo * screen, char *arg);
+ KdParseScreen(KdScreenInfo * screen, const char *arg);
-KdPointerInfo *KdParsePointer(char *arg);
+KdPointerInfo *KdParsePointer(const char *arg);
-KdKeyboardInfo *KdParseKeyboard(char *arg);
+KdKeyboardInfo *KdParseKeyboard(const char *arg);
-char *KdParseFindNext(char *cur, const char *delim, char *save, char *last);
+const char *
+KdParseFindNext(const char *cur, const char *delim, char *save, char *last);
void
KdParseRgba(char *rgba);
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 3aad87a..f93830e 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1086,7 +1086,7 @@ KdParseKbdOptions(KdKeyboardInfo * ki)
}
KdKeyboardInfo *
-KdParseKeyboard(char *arg)
+KdParseKeyboard(const char *arg)
{
char save[1024];
char delim;
@@ -1178,7 +1178,7 @@ KdParsePointerOptions(KdPointerInfo * pi)
}
KdPointerInfo *
-KdParsePointer(char *arg)
+KdParsePointer(const char *arg)
{
char save[1024];
char delim;
commit 7107937e473a3557c37d719cb100b2e9b09075dd
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 13:11:17 2013 +0200
kdrive: Fix const cast warnings in driver name handling.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index aaab0cd..2bfe7f2 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -193,7 +193,7 @@ MouseWriteBytes(int fd, unsigned char *c, int n, int timeout)
#define MAX_VALID 4 /* number of valid packets before accepting */
typedef struct _kmouseProt {
- char *name;
+ const char *name;
Bool (*Complete) (KdPointerInfo * pi, unsigned char *ev, int ne);
int (*Valid) (KdPointerInfo * pi, unsigned char *ev, int ne);
Bool (*Parse) (KdPointerInfo * pi, unsigned char *ev, int ne);
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 4829e1a..96787b6 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -174,7 +174,7 @@ typedef enum _kdPointerState {
typedef struct _KdPointerInfo KdPointerInfo;
typedef struct _KdPointerDriver {
- char *name;
+ const char *name;
Status(*Init) (KdPointerInfo *);
Status(*Enable) (KdPointerInfo *);
void (*Disable) (KdPointerInfo *);
@@ -243,7 +243,7 @@ typedef struct {
typedef struct _KdKeyboardInfo KdKeyboardInfo;
typedef struct _KdKeyboardDriver {
- char *name;
+ const char *name;
Bool (*Init) (KdKeyboardInfo *);
Bool (*Enable) (KdKeyboardInfo *);
void (*Leds) (KdKeyboardInfo *, int);
commit 56c405d46a86853771a0b808da4c8a9ef626960c
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 13:07:23 2013 +0200
kdrive: Fix a few easy cast warnings.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c
index 9982fad..63e8409 100644
--- a/hw/kdrive/linux/evdev.c
+++ b/hw/kdrive/linux/evdev.c
@@ -186,7 +186,7 @@ EvdevPtrRead(int evdevPort, void *closure)
}
}
-char *kdefaultEvdev[] = {
+const char *kdefaultEvdev[] = {
"/dev/input/event0",
"/dev/input/event1",
"/dev/input/event2",
diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 498c239..00de2ae 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -63,7 +63,7 @@ LinuxVTRequest(int sig)
/* Check before chowning -- this avoids touching the file system */
static void
-LinuxCheckChown(char *file)
+LinuxCheckChown(const char *file)
{
struct stat st;
__uid_t u;
diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index f442447..aaab0cd 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -738,7 +738,7 @@ MouseInitProtocol(Kmouse * km)
}
static void
-MouseFirstProtocol(Kmouse * km, char *prot)
+MouseFirstProtocol(Kmouse * km, const char *prot)
{
if (prot) {
for (km->i_prot = 0; km->i_prot < NUM_PROT; km->i_prot++)
@@ -887,7 +887,7 @@ MouseRead(int mousePort, void *closure)
int MouseInputType;
-char *kdefaultMouse[] = {
+const char *kdefaultMouse[] = {
"/dev/input/mice",
"/dev/mouse",
"/dev/psaux",
diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c
index d1522a2..e5417a5 100644
--- a/hw/kdrive/linux/ps2.c
+++ b/hw/kdrive/linux/ps2.c
@@ -58,7 +58,7 @@ Ps2ReadBytes(int fd, char *buf, int len, int min)
return tot;
}
-char *Ps2Names[] = {
+const char *Ps2Names[] = {
"/dev/psaux",
/* "/dev/mouse", */
"/dev/input/mice",
commit a9c48a07eea50468fa47ab178cdd91edb0b5727f
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 13:06:23 2013 +0200
kdrive: Drop dead code.
This is unused as of the introduction of a helper in
e7150db5350bc2113ff4126019b489847a4dc217
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index c30f170..3aad87a 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1675,13 +1675,6 @@ char *kdActionNames[] = {
};
#endif /* DEBUG */
-static void
-KdQueueEvent(DeviceIntPtr pDev, InternalEvent *ev)
-{
- KdAssertSigioBlocked("KdQueueEvent");
- mieqEnqueue(pDev, ev);
-}
-
/* We return true if we're stealing the event. */
static Bool
KdRunMouseMachine(KdPointerInfo * pi, KdInputClass c, int type, int x, int y,
commit 873ae962bdb7559c952b5955ba262285701982a8
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 13:01:57 2013 +0200
ephyr: Fix dead code warning.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c
index 6a4392f..5ecb02d 100644
--- a/hw/kdrive/ephyr/ephyrhostglx.c
+++ b/hw/kdrive/ephyr/ephyrhostglx.c
@@ -274,7 +274,6 @@ ephyrHostGLXGetVisualConfigsInternal(enum VisualConfRequestType a_type,
xGLXGetVisualConfigsReply reply;
char *server_glx_version = NULL, *server_glx_extensions = NULL;
int j = 0,
- screens = 0,
major_opcode = 0,
num_props = 0,
num_visuals = 0, props_buf_size = 0, props_per_visual_size = 0;
@@ -282,7 +281,6 @@ ephyrHostGLXGetVisualConfigsInternal(enum VisualConfRequestType a_type,
EPHYR_RETURN_VAL_IF_FAIL(dpy, FALSE);
- screens = ScreenCount(dpy);
if (!ephyrHostGLXGetMajorOpcode(&major_opcode)) {
EPHYR_LOG_ERROR("failed to get opcode\n");
goto out;
commit 34af2eebe19e2f8afe35a5614d4d44fa4fd89d6b
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 13:01:32 2013 +0200
ephyr: Fix const-cast warnings for setting window title.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index f2b458d..5071289 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -215,7 +215,7 @@ hostx_set_screen_number(EphyrScreenInfo screen, int number)
}
void
-hostx_set_win_title(EphyrScreenInfo screen, char *extra_text)
+hostx_set_win_title(EphyrScreenInfo screen, const char *extra_text)
{
struct EphyrHostScreen *host_screen = host_screen_from_screen_info(screen);
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index 38b7b37..f47297c 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -171,7 +171,7 @@ void
hostx_set_screen_number(EphyrScreenInfo screen, int number);
void
- hostx_set_win_title(EphyrScreenInfo screen, char *extra_text);
+ hostx_set_win_title(EphyrScreenInfo screen, const char *extra_text);
int
hostx_get_depth(void);
commit 7edf5066db48434739ac64e0576fbb4fdf0f37f9
Author: Eric Anholt <eric at anholt.net>
Date: Sat Aug 17 12:54:33 2013 +0200
ephyr: Fix const cast warnings in ephyrhostvideo.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/hw/kdrive/ephyr/ephyrhostvideo.c b/hw/kdrive/ephyr/ephyrhostvideo.c
index 05e9ad9..99f0f50 100644
--- a/hw/kdrive/ephyr/ephyrhostvideo.c
+++ b/hw/kdrive/ephyr/ephyrhostvideo.c
@@ -58,7 +58,7 @@
#endif /*FALSE*/
static XExtensionInfo _xv_info_data;
static XExtensionInfo *xv_info = &_xv_info_data;
-static char *xv_extension_name = XvName;
+static const char *xv_extension_name = XvName;
static char *xv_error_string(Display * dpy, int code, XExtCodes * codes,
char *buf, int n);
static int xv_close_display(Display * dpy, XExtCodes * codes);
@@ -78,7 +78,7 @@ static XExtensionHooks xv_extension_hooks = {
xv_error_string /* error_string */
};
-static char *xv_error_list[] = {
+static const char *xv_error_list[] = {
"BadPort", /* XvBadPort */
"BadEncoding", /* XvBadEncoding */
"BadControl" /* XvBadControl */
@@ -311,7 +311,7 @@ char
ephyrHostXVAdaptorGetType(const EphyrHostXVAdaptor * a_this)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this, -1);
- return ((XvAdaptorInfo *) a_this)->type;
+ return ((const XvAdaptorInfo *) a_this)->type;
}
const char *
@@ -319,7 +319,7 @@ ephyrHostXVAdaptorGetName(const EphyrHostXVAdaptor * a_this)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this, NULL);
- return ((XvAdaptorInfo *) a_this)->name;
+ return ((const XvAdaptorInfo *) a_this)->name;
}
EphyrHostVideoFormat *
@@ -333,16 +333,16 @@ ephyrHostXVAdaptorGetVideoFormats(const EphyrHostXVAdaptor * a_this,
EPHYR_RETURN_VAL_IF_FAIL(a_this, NULL);
- nb_formats = ((XvAdaptorInfo *) a_this)->num_formats;
+ nb_formats = ((const XvAdaptorInfo *) a_this)->num_formats;
formats = calloc(nb_formats, sizeof(EphyrHostVideoFormat));
for (i = 0; i < nb_formats; i++) {
memset(&visual_info_template, 0, sizeof(visual_info_template));
visual_info_template.visualid =
- ((XvAdaptorInfo *) a_this)->formats[i].visual_id;
+ ((const XvAdaptorInfo *) a_this)->formats[i].visual_id;
visual_info = XGetVisualInfo(hostx_get_display(),
VisualIDMask,
&visual_info_template, &nb_visual_info);
- formats[i].depth = ((XvAdaptorInfo *) a_this)->formats[i].depth;
+ formats[i].depth = ((const XvAdaptorInfo *) a_this)->formats[i].depth;
formats[i].visual_class = visual_info->class;
XFree(visual_info);
}
@@ -356,7 +356,7 @@ ephyrHostXVAdaptorGetNbPorts(const EphyrHostXVAdaptor * a_this)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this, -1);
- return ((XvAdaptorInfo *) a_this)->num_ports;
+ return ((const XvAdaptorInfo *) a_this)->num_ports;
}
int
@@ -364,7 +364,7 @@ ephyrHostXVAdaptorGetFirstPortID(const EphyrHostXVAdaptor * a_this)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this, -1);
- return ((XvAdaptorInfo *) a_this)->base_id;
+ return ((const XvAdaptorInfo *) a_this)->base_id;
}
Bool
@@ -372,8 +372,8 @@ ephyrHostXVAdaptorHasPutVideo(const EphyrHostXVAdaptor * a_this, Bool *a_result)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE);
- if ((((XvAdaptorInfo *) a_this)->type & (XvVideoMask | XvInputMask)) ==
- (XvVideoMask | XvInputMask))
+ if ((((const XvAdaptorInfo *) a_this)->type &
+ (XvVideoMask | XvInputMask)) == (XvVideoMask | XvInputMask))
*a_result = TRUE;
else
*a_result = FALSE;
@@ -383,8 +383,8 @@ ephyrHostXVAdaptorHasPutVideo(const EphyrHostXVAdaptor * a_this, Bool *a_result)
Bool
ephyrHostXVAdaptorHasGetVideo(const EphyrHostXVAdaptor * a_this, Bool *a_result)
{
- if ((((XvAdaptorInfo *) a_this)->type & (XvVideoMask | XvOutputMask)) ==
- (XvVideoMask | XvOutputMask))
+ if ((((const XvAdaptorInfo *) a_this)->type &
+ (XvVideoMask | XvOutputMask)) == (XvVideoMask | XvOutputMask))
*a_result = TRUE;
else
*a_result = FALSE;
@@ -396,8 +396,8 @@ ephyrHostXVAdaptorHasPutStill(const EphyrHostXVAdaptor * a_this, Bool *a_result)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE);
- if ((((XvAdaptorInfo *) a_this)->type & (XvStillMask | XvInputMask)) ==
- (XvStillMask | XvInputMask))
+ if ((((const XvAdaptorInfo *) a_this)->type &
+ (XvStillMask | XvInputMask)) == (XvStillMask | XvInputMask))
*a_result = TRUE;
else
*a_result = FALSE;
@@ -409,8 +409,8 @@ ephyrHostXVAdaptorHasGetStill(const EphyrHostXVAdaptor * a_this, Bool *a_result)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE);
- if ((((XvAdaptorInfo *) a_this)->type & (XvStillMask | XvOutputMask)) ==
- (XvStillMask | XvOutputMask))
+ if ((((const XvAdaptorInfo *) a_this)->type &
+ (XvStillMask | XvOutputMask)) == (XvStillMask | XvOutputMask))
*a_result = TRUE;
else
*a_result = FALSE;
@@ -422,8 +422,8 @@ ephyrHostXVAdaptorHasPutImage(const EphyrHostXVAdaptor * a_this, Bool *a_result)
{
EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE);
- if ((((XvAdaptorInfo *) a_this)->type & (XvImageMask | XvInputMask)) ==
- (XvImageMask | XvInputMask))
+ if ((((const XvAdaptorInfo *) a_this)->type &
+ (XvImageMask | XvInputMask)) == (XvImageMask | XvInputMask))
*a_result = TRUE;
else
*a_result = FALSE;
More information about the xorg-commit
mailing list