summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_copypix.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-01-04 16:10:14 -0800
committerEric Anholt <[email protected]>2012-01-06 09:48:55 -0800
commitfb5252a3518dadd51e88e87382e6510998e9e2f4 (patch)
tree6e69445880895f0e2e9f322ec95ab77430070c78 /src/mesa/swrast/s_copypix.c
parentcedbfc0050af7391b6c8ed54abaa60898208f99d (diff)
swrast: Use the fast copypixels code to implement fast glBlitFramebuffer().
They were meaning to do the same thing of memcpying rows, so just write the code once. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_copypix.c')
-rw-r--r--src/mesa/swrast/s_copypix.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 8fae01f079d..a14b44b9d24 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -422,13 +422,13 @@ copy_stencil_pixels( struct gl_context *ctx, GLint srcx, GLint srcy,
/**
- * Try to do a fast copy pixels with memcpy.
+ * Try to do a fast 1:1 blit with memcpy.
* \return GL_TRUE if successful, GL_FALSE otherwise.
*/
-static GLboolean
-fast_copy_pixels(struct gl_context *ctx,
- GLint srcX, GLint srcY, GLsizei width, GLsizei height,
- GLint dstX, GLint dstY, GLenum type)
+GLboolean
+swrast_fast_copy_pixels(struct gl_context *ctx,
+ GLint srcX, GLint srcY, GLsizei width, GLsizei height,
+ GLint dstX, GLint dstY, GLenum type)
{
struct gl_framebuffer *srcFb = ctx->ReadBuffer;
struct gl_framebuffer *dstFb = ctx->DrawBuffer;
@@ -578,7 +578,8 @@ _swrast_CopyPixels( struct gl_context *ctx,
ctx->Pixel.ZoomX != 1.0F ||
ctx->Pixel.ZoomY != 1.0F ||
ctx->_ImageTransferState) &&
- fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, type)) {
+ swrast_fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty,
+ type)) {
/* all done */
return;
}