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

Side by Side 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: 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3027 // ES3 requires seamless cubemap. ES2 does not. 3027 // ES3 requires seamless cubemap. ES2 does not.
3028 // However, when ES2 is implemented on top of DX11, seamless cubemap is 3028 // However, when ES2 is implemented on top of DX11, seamless cubemap is
3029 // always enabled and there is no way to disable it. 3029 // always enabled and there is no way to disable it.
3030 // Therefore, it seems OK to also always enable it on top of Desktop GL for 3030 // Therefore, it seems OK to also always enable it on top of Desktop GL for
3031 // both ES2 and ES3 contexts. 3031 // both ES2 and ES3 contexts.
3032 if (!feature_info_->workarounds().disable_texture_cube_map_seamless && 3032 if (!feature_info_->workarounds().disable_texture_cube_map_seamless &&
3033 feature_info_->gl_version_info().IsAtLeastGL(3, 2)) { 3033 feature_info_->gl_version_info().IsAtLeastGL(3, 2)) {
3034 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); 3034 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
3035 } 3035 }
3036 3036
3037 if (feature_info_->gl_version_info().IsAtLeastGL(3, 2)) {
Ken Russell (switch to Gerrit) 2016/04/14 00:18:23 Could you add a comment here describing the effect
Zhenyao Mo 2016/04/14 00:26:29 Done.
3038 glEnable(GL_FRAMEBUFFER_SRGB);
3039 }
3040
3037 has_robustness_extension_ = 3041 has_robustness_extension_ =
3038 context->HasExtension("GL_ARB_robustness") || 3042 context->HasExtension("GL_ARB_robustness") ||
3039 context->HasExtension("GL_KHR_robustness") || 3043 context->HasExtension("GL_KHR_robustness") ||
3040 context->HasExtension("GL_EXT_robustness"); 3044 context->HasExtension("GL_EXT_robustness");
3041 3045
3042 if (!InitializeShaderTranslator()) { 3046 if (!InitializeShaderTranslator()) {
3043 return false; 3047 return false;
3044 } 3048 }
3045 3049
3046 GLint viewport_params[4] = { 0 }; 3050 GLint viewport_params[4] = { 0 };
(...skipping 13316 matching lines...) Expand 10 before | Expand all | Expand 10 after
16363 } 16367 }
16364 16368
16365 // Include the auto-generated part of this file. We split this because it means 16369 // Include the auto-generated part of this file. We split this because it means
16366 // we can easily edit the non-auto generated parts right here in this file 16370 // we can easily edit the non-auto generated parts right here in this file
16367 // instead of having to edit some template or the code generator. 16371 // instead of having to edit some template or the code generator.
16368 #include "base/macros.h" 16372 #include "base/macros.h"
16369 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 16373 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
16370 16374
16371 } // namespace gles2 16375 } // namespace gles2
16372 } // namespace gpu 16376 } // namespace gpu
OLDNEW
« 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