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

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

Issue 893213002: Revert of Make GL bindings conditional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « ui/gl/gl_implementation_mac.cc ('k') | ui/gl/gl_implementation_win.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 "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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 kGLImplementationOSMesaGL: 77 case kGLImplementationOSMesaGL:
78 InitializeDynamicGLBindingsGL(context);
79 InitializeDynamicGLBindingsOSMESA(context);
80 break;
78 case kGLImplementationEGLGLES2: 81 case kGLImplementationEGLGLES2:
79 InitializeDynamicGLBindingsGL(context); 82 InitializeDynamicGLBindingsGL(context);
83 InitializeDynamicGLBindingsEGL(context);
80 break; 84 break;
81 case kGLImplementationMockGL: 85 case kGLImplementationMockGL:
82 if (!context) { 86 if (!context) {
83 scoped_refptr<GLContextStubWithExtensions> mock_context( 87 scoped_refptr<GLContextStubWithExtensions> mock_context(
84 new GLContextStubWithExtensions()); 88 new GLContextStubWithExtensions());
85 mock_context->SetGLVersionString("3.0"); 89 mock_context->SetGLVersionString("3.0");
86 InitializeDynamicGLBindingsGL(mock_context.get()); 90 InitializeDynamicGLBindingsGL(mock_context.get());
87 } else 91 } else
88 InitializeDynamicGLBindingsGL(context); 92 InitializeDynamicGLBindingsGL(context);
89 break; 93 break;
(...skipping 18 matching lines...) Expand all
108 switch (GetGLImplementation()) { 112 switch (GetGLImplementation()) {
109 case kGLImplementationEGLGLES2: 113 case kGLImplementationEGLGLES2:
110 return GetGLWindowSystemBindingInfoEGL(info); 114 return GetGLWindowSystemBindingInfoEGL(info);
111 default: 115 default:
112 return false; 116 return false;
113 } 117 }
114 return false; 118 return false;
115 } 119 }
116 120
117 } // namespace gfx 121 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_implementation_mac.cc ('k') | ui/gl/gl_implementation_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698