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

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

Issue 1541283002: Remove ANGLE_pack_reverse_row_order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 95b90de2b01cae3a13c44a8b5876926575b3a209..4c7f4b25c69f22e1ea24b28ff77a19fc2f63d154 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -84,7 +84,6 @@ GLES2Implementation::GLES2Implementation(
GpuControl* gpu_control)
: helper_(helper),
transfer_buffer_(transfer_buffer),
- angle_pack_reverse_row_order_status_(kUnknownExtensionStatus),
chromium_framebuffer_multisample_(kUnknownExtensionStatus),
pack_alignment_(4),
pack_row_length_(0),
@@ -96,7 +95,6 @@ GLES2Implementation::GLES2Implementation(
unpack_skip_rows_(0),
unpack_skip_pixels_(0),
unpack_skip_images_(0),
- pack_reverse_row_order_(false),
active_texture_unit_(0),
bound_framebuffer_(0),
bound_read_framebuffer_(0),
@@ -445,12 +443,6 @@ bool GLES2Implementation::IsExtensionAvailableHelper(
}
}
-bool GLES2Implementation::IsAnglePackReverseRowOrderAvailable() {
- return IsExtensionAvailableHelper(
- "GL_ANGLE_pack_reverse_row_order",
- &angle_pack_reverse_row_order_status_);
-}
-
bool GLES2Implementation::IsChromiumFramebufferMultisampleAvailable() {
return IsExtensionAvailableHelper(
"GL_CHROMIUM_framebuffer_multisample",
@@ -1808,10 +1800,6 @@ void GLES2Implementation::PixelStorei(GLenum pname, GLint param) {
case GL_UNPACK_SKIP_IMAGES:
unpack_skip_images_ = param;
return;
- case GL_PACK_REVERSE_ROW_ORDER_ANGLE:
- pack_reverse_row_order_ =
- IsAnglePackReverseRowOrderAvailable() ? (param != 0) : false;
- break;
default:
break;
}
@@ -3637,25 +3625,13 @@ void GLES2Implementation::ReadPixels(
false);
WaitForCmd();
if (*result != 0) {
- // when doing a y-flip we have to iterate through top-to-bottom chunks
- // of the dst. The service side handles reversing the rows within a
- // chunk.
- int8_t* rows_dst;
- if (pack_reverse_row_order_) {
- rows_dst = dest + (height - num_rows) * dst_padded_row_size;
- } else {
- rows_dst = dest;
- }
// We have to copy 1 row at a time to avoid writing pad bytes.
const int8_t* src = static_cast<const int8_t*>(buffer.address());
for (GLint yy = 0; yy < num_rows; ++yy) {
- memcpy(rows_dst, src, unpadded_row_size);
- rows_dst += dst_padded_row_size;
+ memcpy(dest, src, unpadded_row_size);
+ dest += dst_padded_row_size;
src += padded_row_size;
}
- if (!pack_reverse_row_order_) {
- dest = rows_dst;
- }
}
// If it was not marked as successful exit.
if (*result == 0) {
@@ -4836,10 +4812,6 @@ void GLES2Implementation::RequestExtensionCHROMIUM(const char* extension) {
};
const ExtensionCheck checks[] = {
{
- "GL_ANGLE_pack_reverse_row_order",
- &angle_pack_reverse_row_order_status_,
- },
- {
"GL_CHROMIUM_framebuffer_multisample",
&chromium_framebuffer_multisample_,
},

Powered by Google App Engine
This is Rietveld 408576698