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

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

Issue 1151093006: Added disabling EGL extensions support with --disable-extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some strange formatting Created 5 years, 6 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "ui/gl/gl_bindings.h" 6 #include "ui/gl/gl_bindings.h"
7 #include "ui/gl/gl_context_stub_with_extensions.h" 7 #include "ui/gl/gl_context_stub_with_extensions.h"
8 #include "ui/gl/gl_egl_api_implementation.h" 8 #include "ui/gl/gl_egl_api_implementation.h"
9 #include "ui/gl/gl_gl_api_implementation.h" 9 #include "ui/gl/gl_gl_api_implementation.h"
10 #include "ui/gl/gl_implementation.h" 10 #include "ui/gl/gl_implementation.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 << "Unsupported GL type for Ozone surface implementation"; 67 << "Unsupported GL type for Ozone surface implementation";
68 return false; 68 return false;
69 } 69 }
70 70
71 return true; 71 return true;
72 } 72 }
73 73
74 bool InitializeDynamicGLBindings(GLImplementation implementation, 74 bool InitializeDynamicGLBindings(GLImplementation implementation,
75 GLContext* context) { 75 GLContext* context) {
76 switch (implementation) { 76 switch (implementation) {
77 case kGLImplementationEGLGLES2:
78 InitializeDynamicGLBindingsEGL(context);
79 // Intentionally fall through to also initialize Dynamic GL Bindings.
77 case kGLImplementationOSMesaGL: 80 case kGLImplementationOSMesaGL:
78 case kGLImplementationEGLGLES2:
79 InitializeDynamicGLBindingsGL(context); 81 InitializeDynamicGLBindingsGL(context);
80 break; 82 break;
81 case kGLImplementationMockGL: 83 case kGLImplementationMockGL:
82 if (!context) { 84 if (!context) {
83 scoped_refptr<GLContextStubWithExtensions> mock_context( 85 scoped_refptr<GLContextStubWithExtensions> mock_context(
84 new GLContextStubWithExtensions()); 86 new GLContextStubWithExtensions());
85 mock_context->SetGLVersionString("3.0"); 87 mock_context->SetGLVersionString("3.0");
86 InitializeDynamicGLBindingsGL(mock_context.get()); 88 InitializeDynamicGLBindingsGL(mock_context.get());
87 } else 89 } else
88 InitializeDynamicGLBindingsGL(context); 90 InitializeDynamicGLBindingsGL(context);
(...skipping 19 matching lines...) Expand all
108 switch (GetGLImplementation()) { 110 switch (GetGLImplementation()) {
109 case kGLImplementationEGLGLES2: 111 case kGLImplementationEGLGLES2:
110 return GetGLWindowSystemBindingInfoEGL(info); 112 return GetGLWindowSystemBindingInfoEGL(info);
111 default: 113 default:
112 return false; 114 return false;
113 } 115 }
114 return false; 116 return false;
115 } 117 }
116 118
117 } // namespace gfx 119 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698