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

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

Issue 434063: Merged in recent changes to command buffer code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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.cc
===================================================================
--- gpu/command_buffer/common/gles2_cmd_utils.cc (revision 33021)
+++ gpu/command_buffer/common/gles2_cmd_utils.cc (working copy)
@@ -332,12 +332,13 @@
// Returns the amount of data glTexImage2D or glTexSubImage2D will access.
uint32 GLES2Util::ComputeImageDataSize(
int width, int height, int format, int type, int unpack_alignment) {
- uint32 bytes_per_group = BytesPerElement(ElementsPerGroup(format, type));
+ uint32 bytes_per_group =
+ BytesPerElement(type) * ElementsPerGroup(format, type);
uint32 row_size = width * bytes_per_group;
if (height > 1) {
uint32 padded_row_size = ((row_size + unpack_alignment - 1) /
unpack_alignment) * unpack_alignment;
- return height - 1 * padded_row_size + row_size;
+ return (height - 1) * padded_row_size + row_size;
}
return height * row_size;
}
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_test_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698