| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 SetRealGLApi(); | 116 SetRealGLApi(); |
| 117 | 117 |
| 118 SetCurrent(surface); | 118 SetCurrent(surface); |
| 119 if (!InitializeExtensionBindings()) { | 119 if (!InitializeExtensionBindings()) { |
| 120 ReleaseCurrent(surface); | 120 ReleaseCurrent(surface); |
| 121 return false; | 121 return false; |
| 122 } | 122 } |
| 123 | 123 |
| 124 if (!surface->OnMakeCurrent(this)) { | 124 if (!surface->OnMakeCurrent(this)) { |
| 125 LOG(ERROR) << "Could not make current."; | 125 LOG(ERROR) << "Could not make current."; |
| 126 ReleaseCurrent(surface); |
| 126 return false; | 127 return false; |
| 127 } | 128 } |
| 128 | 129 |
| 129 return true; | 130 return true; |
| 130 } | 131 } |
| 131 | 132 |
| 132 void GLContextEGL::SetUnbindFboOnMakeCurrent() { | 133 void GLContextEGL::SetUnbindFboOnMakeCurrent() { |
| 133 unbind_fbo_on_makecurrent_ = true; | 134 unbind_fbo_on_makecurrent_ = true; |
| 134 } | 135 } |
| 135 | 136 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 200 |
| 200 #if !defined(OS_ANDROID) | 201 #if !defined(OS_ANDROID) |
| 201 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) { | 202 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) { |
| 202 DCHECK(bytes); | 203 DCHECK(bytes); |
| 203 *bytes = 0; | 204 *bytes = 0; |
| 204 return false; | 205 return false; |
| 205 } | 206 } |
| 206 #endif | 207 #endif |
| 207 | 208 |
| 208 } // namespace gfx | 209 } // namespace gfx |
| OLD | NEW |