OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gl/SkNativeGLContext.h" | 8 #include "gl/SkNativeGLContext.h" |
9 | 9 |
10 #include <GL/glu.h> | 10 #include <GL/glu.h> |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 return NULL; | 278 return NULL; |
279 } | 279 } |
280 return interface; | 280 return interface; |
281 } | 281 } |
282 | 282 |
283 void SkNativeGLContext::makeCurrent() const { | 283 void SkNativeGLContext::makeCurrent() const { |
284 if (!glXMakeCurrent(fDisplay, fGlxPixmap, fContext)) { | 284 if (!glXMakeCurrent(fDisplay, fGlxPixmap, fContext)) { |
285 SkDebugf("Could not set the context.\n"); | 285 SkDebugf("Could not set the context.\n"); |
286 } | 286 } |
287 } | 287 } |
| 288 |
| 289 void SkNativeGLContext::swapBuffers() const { |
| 290 glXSwapBuffers(fDisplay, fGlxPixmap); |
| 291 } |
OLD | NEW |