| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 | 8 |
| 9 #include "gl/SkANGLEGLContext.h" | 9 #include "gl/angle/SkANGLEGLContext.h" |
| 10 | 10 |
| 11 SkANGLEGLContext::SkANGLEGLContext() | 11 SkANGLEGLContext::SkANGLEGLContext() |
| 12 : fContext(EGL_NO_CONTEXT) | 12 : fContext(EGL_NO_CONTEXT) |
| 13 , fDisplay(EGL_NO_DISPLAY) | 13 , fDisplay(EGL_NO_DISPLAY) |
| 14 , fSurface(EGL_NO_SURFACE) { | 14 , fSurface(EGL_NO_SURFACE) { |
| 15 fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); | 15 fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); |
| 16 | 16 |
| 17 EGLint majorVersion; | 17 EGLint majorVersion; |
| 18 EGLint minorVersion; | 18 EGLint minorVersion; |
| 19 eglInitialize(fDisplay, &majorVersion, &minorVersion); | 19 eglInitialize(fDisplay, &majorVersion, &minorVersion); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) { | 89 if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) { |
| 90 SkDebugf("Could not set the context.\n"); | 90 SkDebugf("Could not set the context.\n"); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 void SkANGLEGLContext::swapBuffers() const { | 94 void SkANGLEGLContext::swapBuffers() const { |
| 95 if (!eglSwapBuffers(fDisplay, fSurface)) { | 95 if (!eglSwapBuffers(fDisplay, fSurface)) { |
| 96 SkDebugf("Could not complete eglSwapBuffers.\n"); | 96 SkDebugf("Could not complete eglSwapBuffers.\n"); |
| 97 } | 97 } |
| 98 } | 98 } |
| OLD | NEW |