OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gfx/gl/gl_context_egl.h" | 5 #include "ui/gfx/gl/gl_context_egl.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.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 "third_party/angle/include/EGL/egl.h" | 10 #include "third_party/angle/include/EGL/egl.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return false; | 139 return false; |
140 } | 140 } |
141 | 141 |
142 return true; | 142 return true; |
143 } | 143 } |
144 | 144 |
145 void* GLContextEGL::GetHandle() { | 145 void* GLContextEGL::GetHandle() { |
146 return context_; | 146 return context_; |
147 } | 147 } |
148 | 148 |
| 149 EGLDisplay GLContextEGL::GetDisplay() { |
| 150 return display_; |
| 151 } |
| 152 |
149 void GLContextEGL::SetSwapInterval(int interval) { | 153 void GLContextEGL::SetSwapInterval(int interval) { |
150 DCHECK(IsCurrent(NULL)); | 154 DCHECK(IsCurrent(NULL)); |
151 if (!eglSwapInterval(display_, interval)) { | 155 if (!eglSwapInterval(display_, interval)) { |
152 LOG(ERROR) << "eglSwapInterval failed with error " | 156 LOG(ERROR) << "eglSwapInterval failed with error " |
153 << GetLastEGLErrorString(); | 157 << GetLastEGLErrorString(); |
154 } | 158 } |
155 } | 159 } |
156 | 160 |
157 } // namespace gfx | 161 } // namespace gfx |
OLD | NEW |