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/angle/SkANGLEGLContext.h" | 9 #include "gl/angle/SkANGLEGLContext.h" |
10 | 10 |
11 #include <EGL/egl.h> | 11 #include <EGL/egl.h> |
12 | 12 |
13 #define EGL_PLATFORM_ANGLE_ANGLE 0x3202 | 13 #define EGL_PLATFORM_ANGLE_ANGLE 0x3201 |
14 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203 | 14 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 |
15 #define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207 | 15 #define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3206 |
16 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208 | 16 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207 |
17 | 17 |
18 void* SkANGLEGLContext::GetD3DEGLDisplay(void* nativeDisplay) { | 18 void* SkANGLEGLContext::GetD3DEGLDisplay(void* nativeDisplay) { |
19 | 19 |
20 typedef EGLDisplay (*EGLGetPlatformDisplayEXT)(EGLenum platform, | 20 typedef EGLDisplay (*EGLGetPlatformDisplayEXT)(EGLenum platform, |
21 void *native_display, | 21 void *native_display, |
22 const EGLint *attrib_list); | 22 const EGLint *attrib_list); |
23 EGLGetPlatformDisplayEXT eglGetPlatformDisplayEXT; | 23 EGLGetPlatformDisplayEXT eglGetPlatformDisplayEXT; |
24 eglGetPlatformDisplayEXT = | 24 eglGetPlatformDisplayEXT = |
25 (EGLGetPlatformDisplayEXT) eglGetProcAddress("eglGetPlatformDisplayEXT")
; | 25 (EGLGetPlatformDisplayEXT) eglGetProcAddress("eglGetPlatformDisplayEXT")
; |
26 | 26 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 void SkANGLEGLContext::onPlatformSwapBuffers() const { | 144 void SkANGLEGLContext::onPlatformSwapBuffers() const { |
145 if (!eglSwapBuffers(fDisplay, fSurface)) { | 145 if (!eglSwapBuffers(fDisplay, fSurface)) { |
146 SkDebugf("Could not complete eglSwapBuffers.\n"); | 146 SkDebugf("Could not complete eglSwapBuffers.\n"); |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const { | 150 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const { |
151 return eglGetProcAddress(name); | 151 return eglGetProcAddress(name); |
152 } | 152 } |
OLD | NEW |