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

Side by Side Diff: ui/gl/gl_egl_api_implementation.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_egl_api_implementation.h ('k') | ui/gl/gl_gl_api_implementation.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 "ui/gl/gl_egl_api_implementation.h" 5 #include "ui/gl/gl_egl_api_implementation.h"
6 #include "ui/gl/gl_implementation.h" 6 #include "ui/gl/gl_implementation.h"
7 7
8 namespace gfx { 8 namespace gfx {
9 9
10 RealEGLApi* g_real_egl; 10 RealEGLApi* g_real_egl;
11 11
12 void InitializeStaticGLBindingsEGL() { 12 void InitializeStaticGLBindingsEGL() {
13 g_driver_egl.InitializeStaticBindings();
13 if (!g_real_egl) { 14 if (!g_real_egl) {
14 g_real_egl = new RealEGLApi(); 15 g_real_egl = new RealEGLApi();
15 } 16 }
16 g_real_egl->Initialize(&g_driver_egl); 17 g_real_egl->Initialize(&g_driver_egl);
17 g_current_egl_context = g_real_egl; 18 g_current_egl_context = g_real_egl;
18 g_driver_egl.InitializeStaticBindings(); 19 }
20
21 void InitializeDynamicGLBindingsEGL(GLContext* context) {
22 g_driver_egl.InitializeDynamicBindings(context);
19 } 23 }
20 24
21 void InitializeDebugGLBindingsEGL() { 25 void InitializeDebugGLBindingsEGL() {
22 g_driver_egl.InitializeDebugBindings(); 26 g_driver_egl.InitializeDebugBindings();
23 } 27 }
24 28
25 void ClearGLBindingsEGL() { 29 void ClearGLBindingsEGL() {
26 if (g_real_egl) { 30 if (g_real_egl) {
27 delete g_real_egl; 31 delete g_real_egl;
28 g_real_egl = NULL; 32 g_real_egl = NULL;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if (version) 76 if (version)
73 info->version = version; 77 info->version = version;
74 if (extensions) 78 if (extensions)
75 info->extensions = extensions; 79 info->extensions = extensions;
76 return true; 80 return true;
77 } 81 }
78 82
79 } // namespace gfx 83 } // namespace gfx
80 84
81 85
OLDNEW
« no previous file with comments | « ui/gl/gl_egl_api_implementation.h ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698