diff options
author | Brian Paul <[email protected]> | 2012-04-20 07:58:59 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-05-01 11:39:34 -0600 |
commit | 7b610d55160cf77b8d8de0a7bc58c75985ba8747 (patch) | |
tree | 9e7b969e25801f67f3b029873dc931cbdf7520c8 /src/mesa | |
parent | 4433b0302d0aa9dc61002e8bb4fd1b752b0be338 (diff) |
xlib: use _mesa_is_winsys/user_fbo() helpers
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 7748298d49f..12004ba71df 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -32,6 +32,7 @@ #include "main/bufferobj.h" #include "main/context.h" #include "main/colormac.h" +#include "main/fbobject.h" #include "main/macros.h" #include "main/image.h" #include "main/imports.h" @@ -69,7 +70,7 @@ color_mask(struct gl_context *ctx, const int xclass = xmesa->xm_visual->visualType; (void) amask; - if (ctx->DrawBuffer->Name != 0) + if (_mesa_is_user_fbo(ctx->DrawBuffer)) return; xmbuf = XMESA_BUFFER(ctx->DrawBuffer); @@ -240,7 +241,7 @@ clear_nbit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb, static void clear_buffers(struct gl_context *ctx, GLbitfield buffers) { - if (ctx->DrawBuffer->Name == 0) { + if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) { /* this is a window system framebuffer */ const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0]; const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -304,7 +305,7 @@ can_do_DrawPixels_8R8G8B(struct gl_context *ctx, GLenum format, GLenum type) if (format == GL_BGRA && type == GL_UNSIGNED_BYTE && ctx->DrawBuffer && - ctx->DrawBuffer->Name == 0 && + _mesa_is_winsys_fbo(ctx->DrawBuffer) && ctx->Pixel.ZoomX == 1.0 && /* no zooming */ ctx->Pixel.ZoomY == 1.0 && ctx->_ImageTransferState == 0 /* no color tables, scale/bias, etc */) { @@ -437,7 +438,7 @@ can_do_DrawPixels_5R6G5B(struct gl_context *ctx, GLenum format, GLenum type) type == GL_UNSIGNED_SHORT_5_6_5 && !ctx->Color.DitherFlag && /* no dithering */ ctx->DrawBuffer && - ctx->DrawBuffer->Name == 0 && + _mesa_is_winsys_fbo(ctx->DrawBuffer) && ctx->Pixel.ZoomX == 1.0 && /* no zooming */ ctx->Pixel.ZoomY == 1.0 && ctx->_ImageTransferState == 0 /* no color tables, scale/bias, etc */) { @@ -693,7 +694,7 @@ xmesa_update_state( struct gl_context *ctx, GLbitfield new_state ) _vbo_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); - if (ctx->DrawBuffer->Name != 0) + if (_mesa_is_user_fbo(ctx->DrawBuffer)) return; /* |