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

Side by Side 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 unified diff | Download patch
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 <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after
2931 // VERTEX_PROGRAM_POINT_SIZE and doesn't expose this enum. This fact 2931 // VERTEX_PROGRAM_POINT_SIZE and doesn't expose this enum. This fact
2932 // isn't well documented; it was discovered in the Khronos OpenGL ES 2932 // isn't well documented; it was discovered in the Khronos OpenGL ES
2933 // mailing list archives. It also implicitly enables the desktop GL 2933 // mailing list archives. It also implicitly enables the desktop GL
2934 // capability GL_POINT_SPRITE to provide access to the gl_PointCoord 2934 // capability GL_POINT_SPRITE to provide access to the gl_PointCoord
2935 // variable in fragment shaders. 2935 // variable in fragment shaders.
2936 if (!feature_info_->gl_version_info().BehavesLikeGLES()) { 2936 if (!feature_info_->gl_version_info().BehavesLikeGLES()) {
2937 glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); 2937 glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
2938 glEnable(GL_POINT_SPRITE); 2938 glEnable(GL_POINT_SPRITE);
2939 } 2939 }
2940 2940
2941 // Desktop GL (including the core profile) does not enable this context state
2942 // by default, but OpenGL ES (including when the EXT_sRGB_write_control
2943 // extension is present) enable it by default.
2944 if (!feature_info_->gl_version_info().is_es &&
2945 feature_info_->feature_flags().ext_framebuffer_srgb) {
2946 glEnable(GL_FRAMEBUFFER_SRGB);
2947 }
2948
2941 has_robustness_extension_ = 2949 has_robustness_extension_ =
2942 context->HasExtension("GL_ARB_robustness") || 2950 context->HasExtension("GL_ARB_robustness") ||
2943 context->HasExtension("GL_KHR_robustness") || 2951 context->HasExtension("GL_KHR_robustness") ||
2944 context->HasExtension("GL_EXT_robustness"); 2952 context->HasExtension("GL_EXT_robustness");
2945 2953
2946 if (!InitializeShaderTranslator()) { 2954 if (!InitializeShaderTranslator()) {
2947 return false; 2955 return false;
2948 } 2956 }
2949 2957
2950 GLint viewport_params[4] = { 0 }; 2958 GLint viewport_params[4] = { 0 };
(...skipping 12677 matching lines...) Expand 10 before | Expand all | Expand 10 after
15628 return error::kNoError; 15636 return error::kNoError;
15629 } 15637 }
15630 15638
15631 // Include the auto-generated part of this file. We split this because it means 15639 // Include the auto-generated part of this file. We split this because it means
15632 // we can easily edit the non-auto generated parts right here in this file 15640 // we can easily edit the non-auto generated parts right here in this file
15633 // instead of having to edit some template or the code generator. 15641 // instead of having to edit some template or the code generator.
15634 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15642 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15635 15643
15636 } // namespace gles2 15644 } // namespace gles2
15637 } // namespace gpu 15645 } // namespace gpu
OLDNEW
« 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