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

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

Issue 1886773005: Turn on FRAMEBUFFER_SRGB on desktop GL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 8 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 | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 affed33b0e82a8399fc076eb5e414d73e347da4a..0f9bc4d3a7df26e424c8d44582f4ad7a0723b0f9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3034,6 +3034,14 @@ bool GLES2DecoderImpl::Initialize(const scoped_refptr<gfx::GLSurface>& surface,
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
}
+ // ES3 requires sRGB-linear color space conversion if
+ // FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for a buffer is sRGB, for situations
+ // like blending, clearing, etc.
+ // On Desktop GL, this is not enabled by default.
+ if (feature_info_->gl_version_info().IsAtLeastGL(3, 2)) {
+ glEnable(GL_FRAMEBUFFER_SRGB);
+ }
+
has_robustness_extension_ =
context->HasExtension("GL_ARB_robustness") ||
context->HasExtension("GL_KHR_robustness") ||
« no previous file with comments | « no previous file | 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