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

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

Issue 1488313002: gpu: enable FRAMBUFFER_SRGB on desktop Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no change 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/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 1dec5cf2002c7dfcdf9db9099edbdfd5c3b84b1b..e8d216be2ca9430ac46e5481ac0b023ad3fa6b34 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2938,6 +2938,14 @@ bool GLES2DecoderImpl::Initialize(
glEnable(GL_POINT_SPRITE);
}
+ // Desktop GL (including the core profile) does not enable this context state
+ // by default, but OpenGL ES (including when the EXT_sRGB_write_control
+ // extension is present) enable it by default.
+ if (!feature_info_->gl_version_info().is_es &&
+ feature_info_->feature_flags().ext_framebuffer_srgb) {
+ glEnable(GL_FRAMEBUFFER_SRGB);
+ }
+
has_robustness_extension_ =
context->HasExtension("GL_ARB_robustness") ||
context->HasExtension("GL_KHR_robustness") ||
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698