Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: src/gpu/gl/angle/SkANGLEGLContext.cpp

Issue 947263002: Remove EGL header from SkANGLELContext.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
12
11 #define EGL_PLATFORM_ANGLE_ANGLE 0x3201 13 #define EGL_PLATFORM_ANGLE_ANGLE 0x3201
12 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 14 #define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202
13 #define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3206 15 #define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3206
14 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207 16 #define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207
15 17
16 EGLDisplay SkANGLEGLContext::GetD3DEGLDisplay(EGLNativeDisplayType nativeDisplay ) { 18 void* SkANGLEGLContext::GetD3DEGLDisplay(void* nativeDisplay) {
17 19
18 typedef EGLDisplay (*EGLGetPlatformDisplayEXT)(EGLenum platform, 20 typedef EGLDisplay (*EGLGetPlatformDisplayEXT)(EGLenum platform,
19 void *native_display, 21 void *native_display,
20 const EGLint *attrib_list); 22 const EGLint *attrib_list);
21 EGLGetPlatformDisplayEXT eglGetPlatformDisplayEXT; 23 EGLGetPlatformDisplayEXT eglGetPlatformDisplayEXT;
22 eglGetPlatformDisplayEXT = 24 eglGetPlatformDisplayEXT =
23 (EGLGetPlatformDisplayEXT) eglGetProcAddress("eglGetPlatformDisplayEXT") ; 25 (EGLGetPlatformDisplayEXT) eglGetProcAddress("eglGetPlatformDisplayEXT") ;
24 26
25 if (!eglGetPlatformDisplayEXT) { 27 if (!eglGetPlatformDisplayEXT) {
26 return eglGetDisplay(nativeDisplay); 28 return eglGetDisplay(static_cast<EGLNativeDisplayType>(nativeDisplay));
27 } 29 }
28 30
29 // Try for an ANGLE D3D11 context, fall back to D3D9. 31 // Try for an ANGLE D3D11 context, fall back to D3D9.
30 EGLint attribs[2][3] = { 32 EGLint attribs[2][3] = {
31 { 33 {
32 EGL_PLATFORM_ANGLE_TYPE_ANGLE, 34 EGL_PLATFORM_ANGLE_TYPE_ANGLE,
33 EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 35 EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
34 EGL_NONE 36 EGL_NONE
35 }, 37 },
36 { 38 {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) { 137 if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
136 SkDebugf("Could not set the context.\n"); 138 SkDebugf("Could not set the context.\n");
137 } 139 }
138 } 140 }
139 141
140 void SkANGLEGLContext::swapBuffers() const { 142 void SkANGLEGLContext::swapBuffers() const {
141 if (!eglSwapBuffers(fDisplay, fSurface)) { 143 if (!eglSwapBuffers(fDisplay, fSurface)) {
142 SkDebugf("Could not complete eglSwapBuffers.\n"); 144 SkDebugf("Could not complete eglSwapBuffers.\n");
143 } 145 }
144 } 146 }
OLDNEW
« no previous file with comments | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698