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

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 2473933002: Enable WebGL 2 by default! (on desktop) (Closed)
Patch Set: undo rename of GpuPreferences::enable_unsafe_es3_apis Created 4 years, 1 month 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 | « ui/gl/gl_context_wgl.cc ('k') | ui/gl/gl_switches.h » ('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 "ui/gl/gl_surface_egl.h" 5 #include "ui/gl/gl_surface_egl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (*num_configs == 0) { 224 if (*num_configs == 0) {
225 return false; 225 return false;
226 } 226 }
227 return true; 227 return true;
228 } 228 }
229 229
230 EGLConfig ChooseConfig(GLSurface::Format format) { 230 EGLConfig ChooseConfig(GLSurface::Format format) {
231 // Choose an EGL configuration. 231 // Choose an EGL configuration.
232 // On X this is only used for PBuffer surfaces. 232 // On X this is only used for PBuffer surfaces.
233 std::vector<EGLint> renderable_types; 233 std::vector<EGLint> renderable_types;
234 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 234 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
235 switches::kEnableUnsafeES3APIs)) { 235 switches::kDisableES3GLContext)) {
236 renderable_types.push_back(EGL_OPENGL_ES3_BIT); 236 renderable_types.push_back(EGL_OPENGL_ES3_BIT);
237 } 237 }
238 renderable_types.push_back(EGL_OPENGL_ES2_BIT); 238 renderable_types.push_back(EGL_OPENGL_ES2_BIT);
239 239
240 EGLint buffer_size = 32; 240 EGLint buffer_size = 32;
241 EGLint alpha_size = 8; 241 EGLint alpha_size = 8;
242 242
243 #if defined(USE_X11) && !defined(OS_CHROMEOS) 243 #if defined(USE_X11) && !defined(OS_CHROMEOS)
244 ui::XVisualManager::GetInstance()->ChooseVisualForWindow( 244 ui::XVisualManager::GetInstance()->ChooseVisualForWindow(
245 true, nullptr, &buffer_size, nullptr, nullptr); 245 true, nullptr, &buffer_size, nullptr, nullptr);
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 } 1200 }
1201 1201
1202 void* SurfacelessEGL::GetShareHandle() { 1202 void* SurfacelessEGL::GetShareHandle() {
1203 return NULL; 1203 return NULL;
1204 } 1204 }
1205 1205
1206 SurfacelessEGL::~SurfacelessEGL() { 1206 SurfacelessEGL::~SurfacelessEGL() {
1207 } 1207 }
1208 1208
1209 } // namespace gl 1209 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context_wgl.cc ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698