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

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

Issue 1653063002: Handle glTex{Sub}Image* calls with height==0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 6d6e1a54602698e36890b72aa5f043cda7cea0ae..5033e945292348e897ed3b38c7b469fb64faa0dd 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2274,6 +2274,8 @@ void CopyRectToBuffer(const void* pixels,
uint32_t pixels_padded_row_size,
void* buffer,
uint32_t buffer_padded_row_size) {
+ if (height == 0)
+ return;
const int8_t* source = static_cast<const int8_t*>(pixels);
int8_t* dest = static_cast<int8_t*>(buffer);
if (pixels_padded_row_size != buffer_padded_row_size) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698