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

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

Issue 118203002: During virtual context switches only restore texture units that have changed from the previous cont… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the delta between the ContextStates to decide if we should bind a texture or not Created 7 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/service/gl_state_restorer_impl.cc
diff --git a/gpu/command_buffer/service/gl_state_restorer_impl.cc b/gpu/command_buffer/service/gl_state_restorer_impl.cc
index 7b3c5ed384148318cde872d3a1c343ccb488feab..5493743d9e79157d069dd6876bb1d09703e4a5cb 100644
--- a/gpu/command_buffer/service/gl_state_restorer_impl.cc
+++ b/gpu/command_buffer/service/gl_state_restorer_impl.cc
@@ -21,9 +21,9 @@ bool GLStateRestorerImpl::IsInitialized() {
return decoder_->initialized();
}
-void GLStateRestorerImpl::RestoreState() {
+void GLStateRestorerImpl::RestoreState(const gles2::ContextState* prev_state) {
DCHECK(decoder_.get());
- decoder_->RestoreState();
+ decoder_->RestoreState(prev_state);
}
void GLStateRestorerImpl::RestoreAllTextureUnitBindings() {
@@ -36,4 +36,9 @@ void GLStateRestorerImpl::RestoreFramebufferBindings() {
decoder_->RestoreFramebufferBindings();
}
+const gles2::ContextState* GLStateRestorerImpl::GetContextState() {
+ DCHECK(decoder_.get());
+ return decoder_->GetContextState();
+}
+
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698