summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-01 12:26:37 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-11-01 12:26:37 -0600
commitcd132354dd5a6b778402a2e81d54910ac6c7fb8d (patch)
treebb6a35d9c7d10918bae00c5a79e191424683fb28 /src
parentd0dde6e26c142c27408a0b52c153b571b8737d29 (diff)
move CLIP_TILE, add comments
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/xlib/xm_surface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/pipe/xlib/xm_surface.c b/src/mesa/pipe/xlib/xm_surface.c
index 782a1f29bc..79adc552e4 100644
--- a/src/mesa/pipe/xlib/xm_surface.c
+++ b/src/mesa/pipe/xlib/xm_surface.c
@@ -100,7 +100,8 @@ xmesa_get_tile(struct pipe_context *pipe, struct pipe_surface *ps,
else {
ximage = xms->ximage;
}
-
+
+ /* this could be optimized/simplified */
switch (ps->format) {
case PIPE_FORMAT_U_A8_R8_G8_B8:
if (!dst_stride) {
@@ -155,6 +156,7 @@ xmesa_put_tile(struct pipe_context *pipe, struct pipe_surface *ps,
char *dst;
int i;
+ /* this could be optimized/simplified */
switch (ps->format) {
case PIPE_FORMAT_U_A8_R8_G8_B8:
if (!src_stride) {
@@ -302,14 +304,14 @@ xmesa_put_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
XMesaImage *ximage;
uint i, j;
- CLIP_TILE;
-
if (!xms->drawable && !xms->ximage) {
/* not an X surface */
softpipe_put_tile_rgba(pipe, ps, x, y, w, h, p);
return;
}
+ CLIP_TILE;
+
if (!xms->ximage) {
/* create temp XImage */
char *data = (char *) malloc(w * h * 4);