OLD | NEW |
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_context_egl.h" | 5 #include "ui/gl/gl_context_egl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 context_)) { | 108 context_)) { |
109 DVLOG(1) << "eglMakeCurrent failed with error " | 109 DVLOG(1) << "eglMakeCurrent failed with error " |
110 << GetLastEGLErrorString(); | 110 << GetLastEGLErrorString(); |
111 return false; | 111 return false; |
112 } | 112 } |
113 | 113 |
114 // Set this as soon as the context is current, since we might call into GL. | 114 // Set this as soon as the context is current, since we might call into GL. |
115 SetRealGLApi(); | 115 SetRealGLApi(); |
116 | 116 |
117 SetCurrent(surface); | 117 SetCurrent(surface); |
118 if (!InitializeExtensionBindings()) { | 118 if (!InitializeDynamicBindings()) { |
119 ReleaseCurrent(surface); | 119 ReleaseCurrent(surface); |
120 return false; | 120 return false; |
121 } | 121 } |
122 | 122 |
123 if (!surface->OnMakeCurrent(this)) { | 123 if (!surface->OnMakeCurrent(this)) { |
124 LOG(ERROR) << "Could not make current."; | 124 LOG(ERROR) << "Could not make current."; |
125 return false; | 125 return false; |
126 } | 126 } |
127 | 127 |
128 return true; | 128 return true; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 #if !defined(OS_ANDROID) | 199 #if !defined(OS_ANDROID) |
200 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) { | 200 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) { |
201 DCHECK(bytes); | 201 DCHECK(bytes); |
202 *bytes = 0; | 202 *bytes = 0; |
203 return false; | 203 return false; |
204 } | 204 } |
205 #endif | 205 #endif |
206 | 206 |
207 } // namespace gfx | 207 } // namespace gfx |
OLD | NEW |