OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 <EGL/egl.h> | 5 #include <EGL/egl.h> |
6 | 6 |
7 #include "main.h" | 7 #include "main.h" |
8 #include "xlib_window.h" | 8 #include "xlib_window.h" |
9 | 9 |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 | 80 |
81 void TerminateGL() { | 81 void TerminateGL() { |
82 eglDestroySurface(egl_display, egl_surface); | 82 eglDestroySurface(egl_display, egl_surface); |
83 eglTerminate(egl_display); | 83 eglTerminate(egl_display); |
84 } | 84 } |
85 | 85 |
86 void SwapBuffers() { | 86 void SwapBuffers() { |
87 eglSwapBuffers(egl_display, egl_surface); | 87 eglSwapBuffers(egl_display, egl_surface); |
88 } | 88 } |
| 89 |
| 90 bool SwapInterval(int interval) { |
| 91 return eglSwapInterval(interval) == EGL_TRUE; |
| 92 } |
OLD | NEW |