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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1586053002: Reland of Untouch out of bound pixels for CopyTexSubImage2D (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/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 515a825aaedef5a4becfea456eb0212b8aa51679..7a1bbf69d3f2e68e0f96f6dc2b477cdd669f7232 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -11397,26 +11397,6 @@ void GLES2DecoderImpl::DoCopyTexSubImage2D(
texture_manager()->SetLevelCleared(texture_ref, target, level, true);
}
- if (copyX != x ||
- copyY != y ||
- copyWidth != width ||
- copyHeight != height) {
- // some part was clipped so clear the sub rect.
- uint32_t pixels_size = 0;
- if (!GLES2Util::ComputeImageDataSizes(
- width, height, 1, format, type, state_.unpack_alignment, &pixels_size,
- NULL, NULL)) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_VALUE, "glCopyTexSubImage2D", "dimensions too large");
- return;
- }
- scoped_ptr<char[]> zero(new char[pixels_size]);
- memset(zero.get(), 0, pixels_size);
- glTexSubImage2D(
- target, level, xoffset, yoffset, width, height,
- format, type, zero.get());
- }
Zhenyao Mo 2016/01/14 18:13:37 Look at the code above SetLevelClearedRect(), sinc
qiankun 2016/01/19 16:07:31 Thanks for pointing this. I updated the CL. PTAL.
-
if (copyHeight > 0 && copyWidth > 0) {
GLint dx = copyX - x;
GLint dy = copyY - y;
« 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