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

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

Issue 2246823002: Disable FRAMEBUFFER_SRGB when restoring from a null context state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set framebuffer_srgb_ Created 4 years, 4 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/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index c19ffa5272b5746ecf65646b057a25364cd65693..e9e4de8bb8174d729c271dd43a181791b408c174 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -495,7 +495,12 @@ void ContextState::RestoreState(const ContextState* prev_state) {
RestoreIndexedUniformBufferBindings(prev_state);
RestoreGlobalState(prev_state);
- if (prev_state && framebuffer_srgb_ != prev_state->framebuffer_srgb_) {
+ if (!prev_state) {
+ if (feature_info_->feature_flags().desktop_srgb_support) {
+ framebuffer_srgb_ = false;
+ glDisable(GL_FRAMEBUFFER_SRGB);
+ }
+ } else if (framebuffer_srgb_ != prev_state->framebuffer_srgb_) {
// FRAMEBUFFER_SRGB will be restored lazily at render time.
framebuffer_srgb_ = prev_state->framebuffer_srgb_;
}
« 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