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

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

Issue 1949303003: Improve indexed gl state related GL commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tex
Patch Set: fix a DCHECK failure Created 4 years, 7 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 | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8087716bae26bbe791b0ea4a18179fc6e275fd7e..8c65de16583ec2543376e611e7d24516349b881f 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -315,6 +315,14 @@ void ContextState::RestoreTransformFeedbackBindings(
}
}
+void ContextState::RestoreIndexedUniformBufferBindings(
+ const ContextState* prev_state) {
+ if (!feature_info_->IsES3Capable())
+ return;
+ indexed_uniform_buffer_bindings->RestoreBindings(
+ prev_state ? prev_state->indexed_uniform_buffer_bindings.get() : nullptr);
+}
+
void ContextState::RestoreActiveTexture() const {
glActiveTexture(GL_TEXTURE0 + active_texture_unit);
}
@@ -449,6 +457,7 @@ void ContextState::RestoreState(const ContextState* prev_state) {
RestoreRenderbufferBindings();
RestoreProgramBindings();
RestoreTransformFeedbackBindings(prev_state);
+ RestoreIndexedUniformBufferBindings(prev_state);
RestoreGlobalState(prev_state);
}
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698