summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_span.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c
index 6e4bcb18a0..3ebca32bcf 100644
--- a/src/mesa/drivers/x11/xm_span.c
+++ b/src/mesa/drivers/x11/xm_span.c
@@ -3471,8 +3471,8 @@ clip_for_xgetimage(XMesaContext xmesa, GLuint *n, GLint *x, GLint *y)
XMesaBuffer source = xmesa->xm_buffer;
Window rootWin = RootWindow(xmesa->display, 0);
Window child;
- int screenWidth = WidthOfScreen(DefaultScreenOfDisplay(xmesa->display));
- int dx, dy;
+ GLint screenWidth = WidthOfScreen(DefaultScreenOfDisplay(xmesa->display));
+ GLint dx, dy;
XTranslateCoordinates(xmesa->display, source->buffer, rootWin,
*x, *y, &dx, &dy, &child);
if (dx >= screenWidth) {
@@ -3481,17 +3481,17 @@ clip_for_xgetimage(XMesaContext xmesa, GLuint *n, GLint *x, GLint *y)
}
if (dx < 0) {
/* clipped on left */
- int clip = -dx;
- if (clip >= *n)
+ GLint clip = -dx;
+ if (clip >= (GLint) *n)
return -1; /* totally clipped on left */
*x += clip;
*n -= clip;
dx = 0;
return clip;
}
- if (dx + *n > screenWidth) {
+ if ((GLint) (dx + *n) > screenWidth) {
/* clipped on right */
- int clip = dx + *n - screenWidth;
+ GLint clip = dx + *n - screenWidth;
*n -= clip;
}
return 0;