Remove EGL header from SkANGLELContext.h

TBR=egdaniel@google.com

Review URL: https://codereview.chromium.org/947263002
This commit is contained in:
bsalomon 2015-02-23 10:51:13 -08:00 committed by Commit bot
parent 44906c6628
commit 93276c683d
2 changed files with 9 additions and 8 deletions

View File

@ -12,8 +12,6 @@
#include "gl/SkGLContext.h"
#include <EGL/egl.h>
class SkANGLEGLContext : public SkGLContext {
public:
~SkANGLEGLContext() SK_OVERRIDE;
@ -32,15 +30,16 @@ public:
return ctx;
}
static EGLDisplay GetD3DEGLDisplay(EGLNativeDisplayType nativeDisplay);
// The param is an EGLNativeDisplayType and the return is an EGLDispay.
static void* GetD3DEGLDisplay(void* nativeDisplay);
private:
SkANGLEGLContext();
void destroyGLContext();
EGLContext fContext;
EGLDisplay fDisplay;
EGLSurface fSurface;
void* fContext;
void* fDisplay;
void* fSurface;
};
#endif

View File

@ -8,12 +8,14 @@
#include "gl/angle/SkANGLEGLContext.h"
#include <EGL/egl.h>
#define EGL_PLATFORM_ANGLE_ANGLE 0x3201
#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202
#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3206
#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207
EGLDisplay SkANGLEGLContext::GetD3DEGLDisplay(EGLNativeDisplayType nativeDisplay) {
void* SkANGLEGLContext::GetD3DEGLDisplay(void* nativeDisplay) {
typedef EGLDisplay (*EGLGetPlatformDisplayEXT)(EGLenum platform,
void *native_display,
@ -23,7 +25,7 @@ EGLDisplay SkANGLEGLContext::GetD3DEGLDisplay(EGLNativeDisplayType nativeDisplay
(EGLGetPlatformDisplayEXT) eglGetProcAddress("eglGetPlatformDisplayEXT");
if (!eglGetPlatformDisplayEXT) {
return eglGetDisplay(nativeDisplay);
return eglGetDisplay(static_cast<EGLNativeDisplayType>(nativeDisplay));
}
// Try for an ANGLE D3D11 context, fall back to D3D9.