Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.h

Issue 10012057: Add GL_EXT_unpack_subimage support to command buffer client code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_utils.h
===================================================================
--- gpu/command_buffer/common/gles2_cmd_utils.h (revision 131422)
+++ gpu/command_buffer/common/gles2_cmd_utils.h (working copy)
@@ -103,10 +103,21 @@
// function is called. If 0 is returned the id is invalid.
int GLGetNumValuesReturned(int id) const;
+ // Computes the size of a single group of elements from a format and type pair
+ static uint32 ComputeImageGroupSize(int format, int type);
+
+ // Computes the size of an image row including alignment padding
+ static bool ComputeImagePaddedRowSize(
+ int width, int format, int type, int unpack_alignment,
+ uint32* padded_row_size);
+
// Computes the size of image data for TexImage2D and TexSubImage2D.
- static bool ComputeImageDataSize(
+ // Optionally the unpadded and padded row sizes can be returned. If height < 2
+ // then the padded_row_size will be the same as the unpadded_row_size since
+ // padding is not necessary.
+ static bool ComputeImageDataSizes(
int width, int height, int format, int type, int unpack_alignment,
- uint32* size);
+ uint32* size, uint32* unpadded_row_size, uint32* padded_row_size);
static size_t RenderbufferBytesPerPixel(int format);
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698