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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 8587040: Fix for GL_CHROMIUM_flipy in TexSubImage2D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
===================================================================
--- gpu/command_buffer/client/gles2_implementation.cc (revision 110357)
+++ gpu/command_buffer/client/gles2_implementation.cc (working copy)
@@ -1569,7 +1569,7 @@
return;
}
- GLsizei original_height = height;
+ GLint original_yoffset = yoffset;
if (padded_row_size <= max_size) {
// Transfer by rows.
GLint max_rows = max_size / std::max(padded_row_size,
@@ -1584,7 +1584,7 @@
CopyRectToBufferFlipped(
source, width, num_rows, format, type, buffer);
// GPU_DCHECK(copy_success); // can't check this because bot fails!
- y = original_height - yoffset - num_rows;
+ y = original_yoffset + height - num_rows;
} else {
memcpy(buffer, source, part_size);
y = yoffset;
@@ -1614,7 +1614,7 @@
GLsizeiptr part_size = num_pixels * element_size;
void* buffer = transfer_buffer_.Alloc(part_size);
memcpy(buffer, row_source, part_size);
- GLint y = unpack_flip_y_ ? (original_height - yoffset - 1) : yoffset;
+ GLint y = unpack_flip_y_ ? (original_yoffset + height - 1) : yoffset;
helper_->TexSubImage2D(
target, level, temp_xoffset, y, num_pixels, 1, format, type,
transfer_buffer_id_, transfer_buffer_.GetOffset(buffer), internal);
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698