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

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

Issue 2076213002: Decompress ETC texture data when there is no native support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unpack alignment Created 4 years, 5 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
Index: gpu/command_buffer/service/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index b717c04b61c8453f196bb5d21b653ddf23c23706..8e0e341d60d36413756116a2ed4c80ca7bdc60d5 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -265,6 +265,19 @@ void ContextState::RestoreTextureUnitBindings(
}
}
+void ContextState::RestoreUnpackState() const {
+ glBindBuffer(GL_PIXEL_UNPACK_BUFFER,
+ GetBufferId(bound_pixel_unpack_buffer.get()));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpack_skip_rows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpack_skip_images);
+ glPixelStorei(GL_UNPACK_SKIP_IMAGES, unpack_skip_images);
piman 2016/07/08 19:30:39 We never pass GL_UNPACK_SKIP_ROWS/PIXELS/IMAGES to
+
+ // UpdateUnpackParameters restores the GL_UNPACK_ROW_LENGTH and
+ // GL_UNPACK_IMAGE_HEIGHT parameters
+ UpdateUnpackParameters();
+}
+
void ContextState::RestoreBufferBindings() const {
if (vertex_attrib_manager.get()) {
Buffer* element_array_buffer =

Powered by Google App Engine
This is Rietveld 408576698