summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-03-18 21:46:17 +0000
committerBrian Paul <[email protected]>2006-03-18 21:46:17 +0000
commit19b05d5009f4b0e83118b351b7261bb914e33f2b (patch)
treecd8bf0bc381823df34ece09e50e2f0ed2c434832 /src/mesa/main/drawpix.c
parent2d2af2dcf716fd4ace91179245ebe4baaa234ded (diff)
Don't call Driver->Bitmap() if no image to render
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 638679e8455..6d855b58006 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -2,7 +2,7 @@
* Mesa 3-D graphics library
* Version: 6.5
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -363,10 +363,12 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
}
if (ctx->RenderMode == GL_RENDER) {
- /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
- GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
- GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
- ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
+ if (bitmap) {
+ /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
+ GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
+ GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
+ ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
+ }
}
#if _HAVE_FULL_GL
else if (ctx->RenderMode == GL_FEEDBACK) {