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

Side by Side Diff: ui/gl/init/gl_factory_android.cc

Issue 2273483004: Call 'InitializeDynamicBindings()' before gl calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/init/gl_factory.h" 5 #include "ui/gl/init/gl_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/gl_context.h" 10 #include "ui/gl/gl_context.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 GLNonOwnedContext::GLNonOwnedContext(GLShareGroup* share_group) 53 GLNonOwnedContext::GLNonOwnedContext(GLShareGroup* share_group)
54 : GLContextReal(share_group), display_(nullptr) {} 54 : GLContextReal(share_group), display_(nullptr) {}
55 55
56 bool GLNonOwnedContext::Initialize(GLSurface* compatible_surface, 56 bool GLNonOwnedContext::Initialize(GLSurface* compatible_surface,
57 GpuPreference gpu_preference) { 57 GpuPreference gpu_preference) {
58 display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY); 58 display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
59 return true; 59 return true;
60 } 60 }
61 61
62 bool GLNonOwnedContext::MakeCurrent(GLSurface* surface) { 62 bool GLNonOwnedContext::MakeCurrent(GLSurface* surface) {
63 SetCurrent(surface); 63 SetCurrent(surface);
kylechar 2016/08/25 13:37:22 Unrelated to your change but it looks like all of
64 SetRealGLApi(); 64 SetRealGLApi();
65 InitializeDynamicBindings();
65 return true; 66 return true;
66 } 67 }
67 68
68 std::string GLNonOwnedContext::GetExtensions() { 69 std::string GLNonOwnedContext::GetExtensions() {
69 const char* extensions = eglQueryString(display_, EGL_EXTENSIONS); 70 const char* extensions = eglQueryString(display_, EGL_EXTENSIONS);
70 if (!extensions) 71 if (!extensions)
71 return GLContext::GetExtensions(); 72 return GLContext::GetExtensions();
72 73
73 return GLContext::GetExtensions() + " " + extensions; 74 return GLContext::GetExtensions() + " " + extensions;
74 } 75 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 case kGLImplementationMockGL: 151 case kGLImplementationMockGL:
151 return new GLSurfaceStub; 152 return new GLSurfaceStub;
152 default: 153 default:
153 NOTREACHED(); 154 NOTREACHED();
154 return nullptr; 155 return nullptr;
155 } 156 }
156 } 157 }
157 158
158 } // namespace init 159 } // namespace init
159 } // namespace gl 160 } // namespace gl
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698