aboutsummaryrefslogtreecommitdiffstats
path: root/shared/OpenglCodecCommon/GLESTextureUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared/OpenglCodecCommon/GLESTextureUtils.h')
-rw-r--r--shared/OpenglCodecCommon/GLESTextureUtils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/shared/OpenglCodecCommon/GLESTextureUtils.h b/shared/OpenglCodecCommon/GLESTextureUtils.h
index 906e5904..f623d23b 100644
--- a/shared/OpenglCodecCommon/GLESTextureUtils.h
+++ b/shared/OpenglCodecCommon/GLESTextureUtils.h
@@ -37,6 +37,21 @@ int computeNeededBufferSize(
int unpackSkipRows,
int unpackSkipImages);
+// Writes out |height| offsets for glReadPixels to read back
+// data in separate rows of pixels. Returns:
+// 1. |startOffset|: offset in bytes to apply at the beginning
+// 2. |packingPixelRowSize|: the buffer size in bytes that has the actual pixels per row.
+// 2. |packingTotalRowSize|: the length in bytes of each row including the padding from row length.
+void computePackingOffsets2D(
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ int packAlignment,
+ int packRowLength,
+ int packSkipPixels,
+ int packSkipRows,
+ int* startOffset,
+ int* packingPixelRowSize,
+ int* packingTotalRowSize);
} // namespace GLESTextureUtils
#endif