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

Side by Side Diff: gpu/command_buffer/service/feature_info.cc

Issue 1641623002: Revert of command_buffer: Enable gl path rendering by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 feature_flags_.is_swiftshader = 219 feature_flags_.is_swiftshader =
220 (command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"); 220 (command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader");
221 221
222 feature_flags_.enable_subscribe_uniform = 222 feature_flags_.enable_subscribe_uniform =
223 command_line->HasSwitch(switches::kEnableSubscribeUniformExtension); 223 command_line->HasSwitch(switches::kEnableSubscribeUniformExtension);
224 224
225 enable_unsafe_es3_apis_switch_ = 225 enable_unsafe_es3_apis_switch_ =
226 command_line->HasSwitch(switches::kEnableUnsafeES3APIs); 226 command_line->HasSwitch(switches::kEnableUnsafeES3APIs);
227 227
228 enable_gl_path_rendering_switch_ =
229 command_line->HasSwitch(switches::kEnableGLPathRendering);
230
228 // The shader translator is needed to translate from WebGL-conformant GLES SL 231 // The shader translator is needed to translate from WebGL-conformant GLES SL
229 // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to 232 // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to
230 // target context GLSL, implement emulation of OpenGL ES features on OpenGL, 233 // target context GLSL, implement emulation of OpenGL ES features on OpenGL,
231 // etc. 234 // etc.
232 // The flag here is for testing only. 235 // The flag here is for testing only.
233 disable_shader_translator_ = 236 disable_shader_translator_ =
234 command_line->HasSwitch(switches::kDisableGLSLTranslator); 237 command_line->HasSwitch(switches::kDisableGLSLTranslator);
235 238
236 unsafe_es3_apis_enabled_ = false; 239 unsafe_es3_apis_enabled_ = false;
237 240
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 if (blend_equation_advanced_coherent) 1174 if (blend_equation_advanced_coherent)
1172 AddExtensionString("GL_KHR_blend_equation_advanced_coherent"); 1175 AddExtensionString("GL_KHR_blend_equation_advanced_coherent");
1173 1176
1174 AddExtensionString("GL_KHR_blend_equation_advanced"); 1177 AddExtensionString("GL_KHR_blend_equation_advanced");
1175 feature_flags_.blend_equation_advanced = true; 1178 feature_flags_.blend_equation_advanced = true;
1176 feature_flags_.blend_equation_advanced_coherent = 1179 feature_flags_.blend_equation_advanced_coherent =
1177 blend_equation_advanced_coherent; 1180 blend_equation_advanced_coherent;
1178 } 1181 }
1179 } 1182 }
1180 1183
1181 if (!workarounds_.disable_gl_path_rendering && 1184 if (enable_gl_path_rendering_switch_ &&
1185 !workarounds_.disable_gl_path_rendering &&
1182 extensions.Contains("GL_NV_path_rendering")) { 1186 extensions.Contains("GL_NV_path_rendering")) {
1183 bool has_dsa = gl_version_info_->IsAtLeastGL(4, 5) || 1187 bool has_dsa = gl_version_info_->IsAtLeastGL(4, 5) ||
1184 extensions.Contains("GL_EXT_direct_state_access"); 1188 extensions.Contains("GL_EXT_direct_state_access");
1185 bool has_piq = gl_version_info_->IsAtLeastGL(4, 3) || 1189 bool has_piq = gl_version_info_->IsAtLeastGL(4, 3) ||
1186 extensions.Contains("GL_ARB_program_interface_query"); 1190 extensions.Contains("GL_ARB_program_interface_query");
1187 if (gl_version_info_->IsAtLeastGLES(3, 1) || 1191 if (gl_version_info_->IsAtLeastGLES(3, 1) ||
1188 (gl_version_info_->IsAtLeastGL(3, 2) && has_dsa && has_piq)) { 1192 (gl_version_info_->IsAtLeastGL(3, 2) && has_dsa && has_piq)) {
1189 AddExtensionString("GL_CHROMIUM_path_rendering"); 1193 AddExtensionString("GL_CHROMIUM_path_rendering");
1190 feature_flags_.chromium_path_rendering = true; 1194 feature_flags_.chromium_path_rendering = true;
1191 validators_.g_l_state.AddValue(GL_PATH_MODELVIEW_MATRIX_CHROMIUM); 1195 validators_.g_l_state.AddValue(GL_PATH_MODELVIEW_MATRIX_CHROMIUM);
1192 validators_.g_l_state.AddValue(GL_PATH_PROJECTION_MATRIX_CHROMIUM); 1196 validators_.g_l_state.AddValue(GL_PATH_PROJECTION_MATRIX_CHROMIUM);
1193 validators_.g_l_state.AddValue(GL_PATH_STENCIL_FUNC_CHROMIUM); 1197 validators_.g_l_state.AddValue(GL_PATH_STENCIL_FUNC_CHROMIUM);
1194 validators_.g_l_state.AddValue(GL_PATH_STENCIL_REF_CHROMIUM); 1198 validators_.g_l_state.AddValue(GL_PATH_STENCIL_REF_CHROMIUM);
1195 validators_.g_l_state.AddValue(GL_PATH_STENCIL_VALUE_MASK_CHROMIUM); 1199 validators_.g_l_state.AddValue(GL_PATH_STENCIL_VALUE_MASK_CHROMIUM);
1196 } 1200 }
1197 } 1201 }
1198 1202
1199 if (!workarounds_.disable_gl_path_rendering && 1203 if (enable_gl_path_rendering_switch_ &&
1204 !workarounds_.disable_gl_path_rendering &&
1200 extensions.Contains("GL_NV_framebuffer_mixed_samples")) { 1205 extensions.Contains("GL_NV_framebuffer_mixed_samples")) {
1201 AddExtensionString("GL_CHROMIUM_framebuffer_mixed_samples"); 1206 AddExtensionString("GL_CHROMIUM_framebuffer_mixed_samples");
1202 feature_flags_.chromium_framebuffer_mixed_samples = true; 1207 feature_flags_.chromium_framebuffer_mixed_samples = true;
1203 validators_.g_l_state.AddValue(GL_COVERAGE_MODULATION_CHROMIUM); 1208 validators_.g_l_state.AddValue(GL_COVERAGE_MODULATION_CHROMIUM);
1204 } 1209 }
1205 1210
1206 if ((gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile || 1211 if ((gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile ||
1207 extensions.Contains("GL_EXT_texture_rg") || 1212 extensions.Contains("GL_EXT_texture_rg") ||
1208 extensions.Contains("GL_ARB_texture_rg")) && 1213 extensions.Contains("GL_ARB_texture_rg")) &&
1209 IsGL_REDSupportedOnFBOs()) { 1214 IsGL_REDSupportedOnFBOs()) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 if (pos == std::string::npos) { 1374 if (pos == std::string::npos) {
1370 extensions_ += (extensions_.empty() ? "" : " ") + str; 1375 extensions_ += (extensions_.empty() ? "" : " ") + str;
1371 } 1376 }
1372 } 1377 }
1373 1378
1374 FeatureInfo::~FeatureInfo() { 1379 FeatureInfo::~FeatureInfo() {
1375 } 1380 }
1376 1381
1377 } // namespace gles2 1382 } // namespace gles2
1378 } // namespace gpu 1383 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698