diff options
author | Laura Ekstrand <[email protected]> | 2015-01-30 14:03:53 -0800 |
---|---|---|
committer | Laura Ekstrand <[email protected]> | 2015-02-02 13:21:20 -0800 |
commit | e187c2f5432466c7b49dba266026fb9b01f5f667 (patch) | |
tree | 6232bca416174ed9c15bdbc69b8c6e650cad76c8 /src/mesa/swrast/s_copypix.c | |
parent | ad2c64abbd7326be35fa1f94c7e056e868ee6185 (diff) |
DD: Refactor BlitFramebuffer.
In preparation for glBlitNamedFramebuffer, the DD table function
BlitFramebuffer needs to accept two arbitrary framebuffer objects rather
than assuming ctx->ReadBuffer and ctx->DrawBuffer.
Reviewed-by: Jason Ekstrand <[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.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index d001734766c..eeea20e8671 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -442,11 +442,11 @@ end: */ 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, + struct gl_framebuffer *dstFb, + 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; struct gl_renderbuffer *srcRb, *dstRb; GLint row; GLuint pixelBytes, widthInBytes; @@ -637,8 +637,9 @@ _swrast_CopyPixels( struct gl_context *ctx, ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F || ctx->_ImageTransferState) && - swrast_fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, - type)) { + swrast_fast_copy_pixels(ctx, ctx->ReadBuffer, ctx->DrawBuffer, + srcx, srcy, width, height, destx, desty, + type)) { /* all done */ return; } |