aboutsummaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2015-04-28 19:32:15 +0200
committerDavid 'Digit' Turner <digit@google.com>2015-05-18 10:52:09 +0200
commitfec1f12627e28cae558799328cdecaf096eb3a71 (patch)
tree4609e99bca8c8b61ce9472b3414657e61c9de13c /distrib
parent31382f89ab0cf576b044ec43228e6d3a4111bb96 (diff)
downloadqemu-fec1f12627e28cae558799328cdecaf096eb3a71.tar.gz
emugl: Remove obsolete EGL API functions.
This removes a few functions from the EGL translator library, since these are not needed by libOpenglRender at all. Less code means less maintenance burden. Change-Id: Iba6361cd42be19f91d186e9440d1503677697be2
Diffstat (limited to 'distrib')
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/Android.mk1
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglImp.cpp152
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglOsApi.h18
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_darwin.cpp24
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_glx.cpp61
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_wgl.cpp66
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.cpp62
-rw-r--r--distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.h37
8 files changed, 2 insertions, 419 deletions
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/Android.mk b/distrib/android-emugl/host/libs/Translator/EGL/Android.mk
index 9f4995e210..ee50fccca1 100644
--- a/distrib/android-emugl/host/libs/Translator/EGL/Android.mk
+++ b/distrib/android-emugl/host/libs/Translator/EGL/Android.mk
@@ -32,7 +32,6 @@ host_common_SRC_FILES := \
EglSurface.cpp \
EglWindowSurface.cpp \
EglPbufferSurface.cpp \
- EglPixmapSurface.cpp \
EglThreadInfo.cpp \
EglDisplay.cpp \
ClientAPIExts.cpp
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglImp.cpp b/distrib/android-emugl/host/libs/Translator/EGL/EglImp.cpp
index 9b98272fae..2e3ae5e53d 100644
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglImp.cpp
+++ b/distrib/android-emugl/host/libs/Translator/EGL/EglImp.cpp
@@ -25,7 +25,6 @@
#include "EglWindowSurface.h"
#include "EglPbufferSurface.h"
-#include "EglPixmapSurface.h"
#include "EglGlobalInfo.h"
#include "EglThreadInfo.h"
#include "EglValidate.h"
@@ -582,34 +581,6 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(
return dpy->addSurface(pbSurface);
}
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay display, EGLConfig config,
- EGLNativePixmapType pixmap,
- const EGLint *attrib_list) {
- VALIDATE_DISPLAY_RETURN(display,EGL_NO_SURFACE);
- VALIDATE_CONFIG_RETURN(config,EGL_NO_SURFACE);
- if(!(cfg->surfaceType() & EGL_PIXMAP_BIT)) {
- RETURN_ERROR(EGL_NO_SURFACE,EGL_BAD_MATCH);
- }
- if(!EglValidate::noAttribs(attrib_list)) {
- RETURN_ERROR(EGL_NO_SURFACE,EGL_BAD_ATTRIBUTE);
- }
- if(EglPixmapSurface::alreadyAssociatedWithConfig(pixmap)) {
- RETURN_ERROR(EGL_NO_SURFACE,EGL_BAD_ALLOC);
- }
-
- unsigned int width,height;
- if(!dpy->nativeType()->checkPixmapPixelFormatMatch(
- pixmap, cfg->nativeFormat(), &width, &height)) {
- RETURN_ERROR(EGL_NO_SURFACE,EGL_BAD_ALLOC);
- }
- SurfacePtr pixSurface(new EglPixmapSurface(dpy, pixmap,cfg));
- if(!pixSurface.Ptr()) {
- RETURN_ERROR(EGL_NO_SURFACE,EGL_BAD_ALLOC);
- }
-
- return dpy->addSurface(pixSurface);
-}
-
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay display, EGLSurface surface) {
VALIDATE_DISPLAY(display);
SurfacePtr srfc = dpy->getSurface(surface);
@@ -768,15 +739,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay display,
RETURN_ERROR(EGL_FALSE,EGL_BAD_NATIVE_WINDOW);
}
- //checking native pixmap validity
- if(newReadPtr->type() == EglSurface::PIXMAP &&
- !nativeDisplay->isValidNativePixmap(nativeRead)) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_NATIVE_PIXMAP);
- }
- if(newDrawPtr->type() == EglSurface::PIXMAP &&
- !nativeDisplay->isValidNativePixmap(nativeDraw)) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_NATIVE_PIXMAP);
- }
if(prevCtx.Ptr()) {
g_eglInfo->getIface(prevCtx->version())->flush();
}
@@ -840,22 +802,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay display, EGLSurface surf
return EGL_TRUE;
}
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay display, EGLint interval) {
- VALIDATE_DISPLAY(display);
- ThreadInfo* thread = getThreadInfo();
- ContextPtr currCtx = thread->eglContext;
- if(currCtx.Ptr()) {
- if(!currCtx->read().Ptr() || !currCtx->draw().Ptr() || currCtx->draw()->type()!=EglSurface::WINDOW) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_CURRENT_SURFACE);
- }
- dpy->nativeType()->swapInterval(currCtx->draw()->native(),interval);
- } else {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_SURFACE);
- }
- return EGL_TRUE;
-}
-
-
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void) {
ThreadInfo* thread = getThreadInfo();
EglDisplay* dpy = static_cast<EglDisplay*>(thread->eglDisplay);
@@ -905,51 +851,6 @@ EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void) {
return (thread->eglContext.Ptr()) ? thread->eglDisplay : EGL_NO_DISPLAY;
}
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void) {
- EGLenum api = eglQueryAPI();
- eglBindAPI(EGL_OPENGL_ES_API);
- EGLBoolean ret = eglWaitClient();
- eglBindAPI(api);
- return ret;
-}
-
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine) {
- if(!EglValidate::engine(engine)) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_PARAMETER);
- }
- ThreadInfo* thread = getThreadInfo();
- ContextPtr currCtx = thread->eglContext;
- EglDisplay* dpy = static_cast<EglDisplay*>(thread->eglDisplay);
- if(currCtx.Ptr()) {
- SurfacePtr read = currCtx->read();
- SurfacePtr draw = currCtx->draw();
-
- EglOS::Display* nativeDisplay = dpy->nativeType();
- if(read.Ptr()) {
- if(read->type() == EglSurface::WINDOW &&
- !nativeDisplay->isValidNativeWin(read->native())) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_SURFACE);
- }
- if(read->type() == EglSurface::PIXMAP &&
- !nativeDisplay->isValidNativePixmap(read->native())) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_SURFACE);
- }
- }
- if(draw.Ptr()) {
- if(draw->type() == EglSurface::WINDOW &&
- !nativeDisplay->isValidNativeWin(draw->native())) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_SURFACE);
- }
- if(draw->type() == EglSurface::PIXMAP &&
- !nativeDisplay->isValidNativePixmap(draw->native())) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_SURFACE);
- }
- }
- }
- EglGlobalInfo::getInstance()->getOsEngine()->wait();
- return EGL_TRUE;
-}
-
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api) {
if(!EglValidate::supportedApi(api)) {
RETURN_ERROR(EGL_FALSE,EGL_BAD_PARAMETER);
@@ -964,18 +865,6 @@ EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void) {
return tls_thread->getApi();
}
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void) {
- ThreadInfo* thread = getThreadInfo();
- ContextPtr currCtx = thread->eglContext;
- if(currCtx.Ptr()) {
- if(!currCtx->read().Ptr() || !currCtx->draw().Ptr()) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_CURRENT_SURFACE);
- }
- g_eglInfo->getIface(currCtx->version())->finish();
- }
- return EGL_TRUE;
-}
-
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void) {
ThreadInfo* thread = getThreadInfo();
EglDisplay* dpy = static_cast<EglDisplay*>(thread->eglDisplay);
@@ -1004,47 +893,6 @@ EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
return retVal;
}
-//not supported for now
-/************************* NOT SUPPORTED FOR NOW ***********************/
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
- EGLDisplay display, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list) {
- VALIDATE_DISPLAY(display);
- VALIDATE_CONFIG(config);
- //we do not support for now openVG, and the only client API resources which may be bound in this fashion are OpenVG
- RETURN_ERROR(EGL_NO_SURFACE,EGL_BAD_PARAMETER);
-}
-
-EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay display, EGLSurface surface,
- EGLNativePixmapType target) {
- VALIDATE_DISPLAY(display);
- VALIDATE_SURFACE(surface,srfc);
- if(!dpy->nativeType()->isValidNativePixmap(NULL)) {
- RETURN_ERROR(EGL_FALSE,EGL_BAD_NATIVE_PIXMAP);
- }
-
- //we do not need to support this for android , since we are not gonna use pixmaps
- RETURN_ERROR(EGL_FALSE,EGL_BAD_NATIVE_PIXMAP);
-}
-
-/***********************************************************************/
-
-
-
-//do last ( only if needed)
-/*********************************************************************************************************/
-EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
-//TODO:
-return 0;
-}
-
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
-//TODO:
-return 0;
-}
-/*********************************************************************************************************/
-
-
/************************** KHR IMAGE *************************************************************/
EglImage *attachEGLImage(unsigned int imageId)
{
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi.h b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi.h
index 5f140b8f5c..55c96461c1 100644
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi.h
+++ b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi.h
@@ -30,7 +30,6 @@ public:
typedef enum {
WINDOW = 0,
PBUFFER = 1,
- PIXMAP,
} SurfaceType;
explicit Surface(SurfaceType type) : mType(type) {}
@@ -125,18 +124,12 @@ public:
virtual bool isValidNativeWin(Surface* win) = 0;
virtual bool isValidNativeWin(EGLNativeWindowType win) = 0;
- virtual bool isValidNativePixmap(Surface* pix) = 0;
virtual bool checkWindowPixelFormatMatch(EGLNativeWindowType win,
const PixelFormat* pixelFormat,
unsigned int* width,
unsigned int* height) = 0;
- virtual bool checkPixmapPixelFormatMatch(EGLNativePixmapType pix,
- const PixelFormat* pixelFormat,
- unsigned int* width,
- unsigned int* height) = 0;
-
virtual Context* createContext(
const PixelFormat* pixelFormat, Context* sharedContext) = 0;
@@ -152,8 +145,6 @@ public:
Context* context) = 0;
virtual void swapBuffers(Surface* srfc) = 0;
-
- virtual void swapInterval(Surface* win, int interval) = 0;
};
// An interface class to model a specific underlying GL graphics subsystem
@@ -178,15 +169,6 @@ public:
// here.
virtual Surface* createWindowSurface(EGLNativeWindowType wnd) = 0;
- // Create a new pixmap surface. |pix| is a host-specific pixmap handle
- // (e.g. a Windows HBITMAP). A software renderer would always return NULL.
- virtual Surface* createPixmapSurface(EGLNativePixmapType pix) = 0;
-
- // Wait for host graphics command completion. This is only useful on X11
- // to gall glXwaitX(), ignored on other platforms or by software
- // engines.
- virtual void wait() = 0;
-
// Retrieve the implementation for the current host. This can be called
// multiple times, and will initialize the engine on first call.
static Engine* getHostInstance();
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_darwin.cpp b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_darwin.cpp
index 64afd6e608..ea5e11c922 100644
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_darwin.cpp
+++ b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_darwin.cpp
@@ -220,11 +220,6 @@ public:
return nsGetWinDims(win, &width, &height);
}
- virtual bool isValidNativePixmap(EglOS::Surface* pix) {
- // no support for pixmap in mac
- return true;
- }
-
virtual bool checkWindowPixelFormatMatch(
EGLNativeWindowType win,
const EglOS::PixelFormat* pixelFormat,
@@ -242,14 +237,6 @@ public:
return ret && match;
}
- virtual bool checkPixmapPixelFormatMatch(
- EGLNativePixmapType pix,
- const EglOS::PixelFormat* pixelFormat,
- unsigned int* width,
- unsigned int* height) {
- return false;
- }
-
virtual EglOS::Context* createContext(
const EglOS::PixelFormat* pixelFormat,
EglOS::Context* sharedContext) {
@@ -329,7 +316,6 @@ public:
macdraw->handle(), mipmapLevel);
break;
}
- case MacSurface::PIXMAP:
default:
return false;
}
@@ -340,10 +326,6 @@ public:
nsSwapBuffers();
}
- virtual void swapInterval(EglOS::Surface* win, int interval) {
- nsSwapInterval(&interval);
- }
-
EGLNativeDisplayType dpy() const { return mDpy; }
private:
@@ -363,12 +345,6 @@ public:
virtual EglOS::Surface* createWindowSurface(EGLNativeWindowType wnd) {
return new MacSurface(wnd, MacSurface::WINDOW);
}
-
- virtual EglOS::Surface* createPixmapSurface(EGLNativePixmapType pix) {
- return new MacSurface(pix, MacSurface::PIXMAP);
- }
-
- virtual void wait() {}
};
emugl::LazyInstance<MacEngine> sHostEngine = LAZY_INSTANCE_INIT;
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_glx.cpp b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_glx.cpp
index be314ee3a9..9ebb1d6b39 100644
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_glx.cpp
+++ b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_glx.cpp
@@ -278,18 +278,6 @@ public:
return handler.getLastError() == 0;
}
- virtual bool isValidNativePixmap(EglOS::Surface* pix) {
- Window root;
- int t;
- unsigned int u;
- ErrorHandler handler(mDisplay);
- GLXDrawable surface = pix ? GlxSurface::drawableFor(pix) : 0;
- if (!XGetGeometry(mDisplay, surface, &root, &t, &t, &u, &u, &u, &u)) {
- return false;
- }
- return handler.getLastError() == 0;
- }
-
virtual bool checkWindowPixelFormatMatch(
EGLNativeWindowType win,
const EglOS::PixelFormat* pixelFormat,
@@ -315,30 +303,6 @@ public:
return depth >= configDepth;
}
- virtual bool checkPixmapPixelFormatMatch(
- EGLNativePixmapType pix,
- const EglOS::PixelFormat* pixelFormat,
- unsigned int* width,
- unsigned int* height) {
- unsigned int depth, configDepth, border;
- int r, g, b, x, y;
- GLXFBConfig fbconfig = GlxPixelFormat::from(pixelFormat);
-
- IS_SUCCESS(glXGetFBConfigAttrib(
- mDisplay, fbconfig, GLX_RED_SIZE, &r));
- IS_SUCCESS(glXGetFBConfigAttrib(
- mDisplay, fbconfig, GLX_GREEN_SIZE, &g));
- IS_SUCCESS(glXGetFBConfigAttrib(
- mDisplay, fbconfig, GLX_BLUE_SIZE, &b));
- configDepth = r + g + b;
- Window root;
- if (!XGetGeometry(
- mDisplay, pix, &root, &x, &y, width, height, &border, &depth)) {
- return false;
- }
- return depth >= configDepth;
- }
-
virtual EglOS::Context* createContext(
const EglOS::PixelFormat* pixelFormat,
EglOS::Context* sharedContext) {
@@ -412,23 +376,6 @@ public:
}
}
- virtual void swapInterval(EglOS::Surface* win, int interval) {
- const char* extensions = glXQueryExtensionsString(
- mDisplay, DefaultScreen(mDisplay));
- typedef void (*GLXSWAPINTERVALEXT)(X11Display*,GLXDrawable,int);
- GLXSWAPINTERVALEXT glXSwapIntervalEXT = NULL;
-
- if(strstr(extensions,"EXT_swap_control")) {
- glXSwapIntervalEXT = (GLXSWAPINTERVALEXT)glXGetProcAddress(
- (const GLubyte*)"glXSwapIntervalEXT");
- }
- if (glXSwapIntervalEXT && win) {
- glXSwapIntervalEXT(mDisplay,
- GlxSurface::drawableFor(win),
- interval);
- }
- }
-
private:
X11Display* mDisplay;
};
@@ -446,14 +393,6 @@ public:
virtual EglOS::Surface* createWindowSurface(EGLNativeWindowType wnd) {
return new GlxSurface(wnd, GlxSurface::WINDOW);
}
-
- virtual EglOS::Surface* createPixmapSurface(EGLNativePixmapType pix) {
- return new GlxSurface(pix, GlxSurface::PIXMAP);
- }
-
- virtual void wait() {
- glXWaitX();
- }
};
emugl::LazyInstance<GlxEngine> sHostEngine = LAZY_INSTANCE_INIT;
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_wgl.cpp b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_wgl.cpp
index 3c6f123d8e..c7ac986664 100644
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_wgl.cpp
+++ b/distrib/android-emugl/host/libs/Translator/EGL/EglOsApi_wgl.cpp
@@ -81,7 +81,6 @@ struct WglExtProcs{
PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
PFNWGLMAKECONTEXTCURRENTARBPROC wglMakeContextCurrentARB;
- PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
};
WglExtProcs* s_wglExtProcs = NULL;
@@ -215,13 +214,6 @@ void initPtrToWglFunctions(){
dpy,
"WGL_ARB_make_current_read",
"wglMakeContextCurrentARB");
-
- s_wglExtProcs->wglSwapIntervalEXT =
- (PFNWGLSWAPINTERVALEXTPROC)
- wglGetExtentionsProcAddress(
- dpy,
- "WGL_EXT_swap_control",
- "wglSwapIntervalEXT");
}
wglMakeCurrent(dpy, NULL);
@@ -262,27 +254,18 @@ public:
Surface(WINDOW),
m_hwnd(wnd),
m_pb(NULL),
- m_bmap(NULL),
m_hdc(GetDC(wnd)) {}
explicit WinSurface(HPBUFFERARB pb) :
Surface(PBUFFER),
m_hwnd(NULL),
m_pb(pb),
- m_bmap(NULL),
m_hdc(NULL) {
if (s_wglExtProcs->wglGetPbufferDCARB) {
m_hdc = s_wglExtProcs->wglGetPbufferDCARB(pb);
}
}
- explicit WinSurface(HBITMAP bmap) :
- Surface(PIXMAP),
- m_hwnd(NULL),
- m_pb(NULL),
- m_bmap(bmap),
- m_hdc(NULL) {}
-
~WinSurface() {
if (type() == WINDOW) {
ReleaseDC(m_hwnd, m_hdc);
@@ -291,7 +274,6 @@ public:
HWND getHwnd() const { return m_hwnd; }
HDC getDC() const { return m_hdc; }
- HBITMAP getBmap() const { return m_bmap; }
HPBUFFERARB getPbuffer() const { return m_pb; }
static WinSurface* from(EglOS::Surface* s) {
@@ -301,7 +283,6 @@ public:
private:
HWND m_hwnd;
HPBUFFERARB m_pb;
- HBITMAP m_bmap;
HDC m_hdc;
};
@@ -455,7 +436,6 @@ void pixelFormatToConfig(WinDisplay* display,
int attribs [] = {
WGL_DRAW_TO_WINDOW_ARB,
- WGL_DRAW_TO_BITMAP_ARB,
WGL_DRAW_TO_PBUFFER_ARB,
WGL_TRANSPARENT_ARB,
WGL_TRANSPARENT_RED_VALUE_ARB,
@@ -467,21 +447,16 @@ void pixelFormatToConfig(WinDisplay* display,
return;
}
- GLint window, bitmap, pbuffer;
+ GLint window, pbuffer;
EXIT_IF_FALSE(s_wglExtProcs->wglGetPixelFormatAttribivARB(
dpy, index, 0, 1, &attribs[0], &window));
EXIT_IF_FALSE(s_wglExtProcs->wglGetPixelFormatAttribivARB(
- dpy, index, 0, 1, &attribs[1], &bitmap));
- EXIT_IF_FALSE(s_wglExtProcs->wglGetPixelFormatAttribivARB(
- dpy, index, 0, 1, &attribs[2], &pbuffer));
+ dpy, index, 0, 1, &attribs[1], &pbuffer));
info.surface_type = 0;
if (window) {
info.surface_type |= EGL_WINDOW_BIT;
}
- if (bitmap) {
- info.surface_type |= EGL_PIXMAP_BIT;
- }
if (pbuffer) {
info.surface_type |= EGL_PBUFFER_BIT;
}
@@ -584,17 +559,6 @@ public:
return IsWindow(win);
}
- virtual bool isValidNativePixmap(EglOS::Surface* pix) {
- if (!pix) {
- return false;
- } else {
- BITMAP bm;
- return GetObject(WinSurface::from(pix)->getBmap(),
- sizeof(BITMAP),
- (LPSTR)&bm);
- }
- }
-
virtual bool checkWindowPixelFormatMatch(
EGLNativeWindowType win,
const EglOS::PixelFormat* pixelFormat,
@@ -613,20 +577,6 @@ public:
return ret;
}
- virtual bool checkPixmapPixelFormatMatch(
- EGLNativePixmapType pix,
- const EglOS::PixelFormat* pixelFormat,
- unsigned int* width,
- unsigned int* height) {
- BITMAP bm;
- if (!GetObject(pix, sizeof(BITMAP), (LPSTR)&bm)) {
- return false;
- }
- *width = bm.bmWidth;
- *height = bm.bmHeight;
- return true;
- }
-
virtual EglOS::Context* createContext(
const EglOS::PixelFormat* pixelFormat,
EglOS::Context* sharedContext) {
@@ -741,12 +691,6 @@ public:
}
}
- virtual void swapInterval(EglOS::Surface* win, int interval) {
- if (s_wglExtProcs->wglSwapIntervalEXT){
- s_wglExtProcs->wglSwapIntervalEXT(interval);
- }
- }
-
private:
WinDisplay* mDpy;
};
@@ -775,12 +719,6 @@ public:
virtual EglOS::Surface* createWindowSurface(EGLNativeWindowType wnd) {
return new WinSurface(wnd);
}
-
- virtual EglOS::Surface* createPixmapSurface(EGLNativePixmapType pix) {
- return new WinSurface(pix);
- }
-
- virtual void wait() {}
};
WinEngine::WinEngine() {
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.cpp b/distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.cpp
deleted file mode 100644
index 40765d69b7..0000000000
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* Copyright (C) 2011 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#include "EglPixmapSurface.h"
-#include "EglGlobalInfo.h"
-#include "EglOsApi.h"
-
-std::set<EGLNativePixmapType> EglPixmapSurface::s_associatedPixmaps;
-
-bool EglPixmapSurface::alreadyAssociatedWithConfig(EGLNativePixmapType pix) {
- return s_associatedPixmaps.find(pix) != s_associatedPixmaps.end();
-
-}
-
-EglPixmapSurface::EglPixmapSurface(EglDisplay *dpy,
- EGLNativePixmapType pix,
- EglConfig* config) :
- EglSurface(dpy, PIXMAP,config,0,0),
- m_pixmap(pix)
-{
- s_associatedPixmaps.insert(pix);
- EglOS::Engine* engine = EglGlobalInfo::getInstance()->getOsEngine();
- m_native = engine->createPixmapSurface(pix);
-}
-
-EglPixmapSurface::~EglPixmapSurface() {
- s_associatedPixmaps.erase(m_pixmap);
-}
-
-bool EglPixmapSurface::getAttrib(EGLint attrib,EGLint* val) {
- switch(attrib) {
- case EGL_CONFIG_ID:
- *val = m_config->id();
- break;
- case EGL_WIDTH:
- *val = m_width;
- break;
- case EGL_HEIGHT:
- *val = m_height;
- break;
- case EGL_LARGEST_PBUFFER:
- case EGL_TEXTURE_FORMAT:
- case EGL_TEXTURE_TARGET:
- case EGL_MIPMAP_TEXTURE:
- break;
- default:
- return false;
- }
- return true;
-}
diff --git a/distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.h b/distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.h
deleted file mode 100644
index f027eabf48..0000000000
--- a/distrib/android-emugl/host/libs/Translator/EGL/EglPixmapSurface.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* Copyright (C) 2011 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#ifndef EGL_PIXMAP_SURFACE_H
-#define EGL_PIXMAP_SURFACE_H
-
-#include <set>
-#include <EGL/egl.h>
-#include "EglSurface.h"
-
-class EglDisplay;
-
-class EglPixmapSurface: public EglSurface {
-public:
- EglPixmapSurface(EglDisplay *dpy, EGLNativePixmapType pix,EglConfig* config);
- ~EglPixmapSurface();
-
- bool getAttrib(EGLint attrib,EGLint* val);
-
- static bool alreadyAssociatedWithConfig(EGLNativePixmapType pix);
-private:
- EGLNativePixmapType m_pixmap;
- static std::set<EGLNativePixmapType> s_associatedPixmaps;
-};
-#endif