summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/readpix.c
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2015-05-19 17:44:52 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2015-07-24 10:48:58 -0700
commit7974e23be9ff7586e5250cff321b6ec7749ecc44 (patch)
tree91bd7463725208d53ea4f4cada4648ca3255ea48 /src/mesa/main/readpix.c
parent013d731a67538a2eb8f508fa54bb86191f0e5491 (diff)
downloadexternal_mesa3d-7974e23be9ff7586e5250cff321b6ec7749ecc44.zip
external_mesa3d-7974e23be9ff7586e5250cff321b6ec7749ecc44.tar.gz
external_mesa3d-7974e23be9ff7586e5250cff321b6ec7749ecc44.tar.bz2
mesa: Turn get_readpixels_transfer_ops() in to a global function
This utility function is utilized in a later patch. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/mesa/main/readpix.c')
-rw-r--r--src/mesa/main/readpix.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 32e31ff..25a0987 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -64,9 +64,11 @@ _mesa_need_rgb_to_luminance_conversion(mesa_format texFormat, GLenum format)
/**
* Return transfer op flags for this ReadPixels operation.
*/
-static GLbitfield
-get_readpixels_transfer_ops(const struct gl_context *ctx, mesa_format texFormat,
- GLenum format, GLenum type, GLboolean uses_blit)
+GLbitfield
+_mesa_get_readpixels_transfer_ops(const struct gl_context *ctx,
+ mesa_format texFormat,
+ GLenum format, GLenum type,
+ GLboolean uses_blit)
{
GLbitfield transferOps = ctx->_ImageTransferState;
@@ -153,8 +155,8 @@ _mesa_readpixels_needs_slow_path(const struct gl_context *ctx, GLenum format,
}
/* And finally, see if there are any transfer ops. */
- return get_readpixels_transfer_ops(ctx, rb->Format, format, type,
- uses_blit) != 0;
+ return _mesa_get_readpixels_transfer_ops(ctx, rb->Format, format, type,
+ uses_blit) != 0;
}
return GL_FALSE;
}
@@ -420,8 +422,8 @@ read_rgba_pixels( struct gl_context *ctx,
if (!rb)
return;
- transferOps = get_readpixels_transfer_ops(ctx, rb->Format, format, type,
- GL_FALSE);
+ transferOps = _mesa_get_readpixels_transfer_ops(ctx, rb->Format, format,
+ type, GL_FALSE);
/* Describe the dst format */
dst_is_integer = _mesa_is_enum_format_integer(format);
dst_stride = _mesa_image_row_stride(packing, width, format, type);