summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-15 12:10:50 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-16 12:52:12 (GMT)
commit5480e3b68da98253ae6ec58bd0db0075225a4e22 (patch)
treea23c222a11182edb210c9fc41a77431af1087540 /src/gui/egl
parentdda010b51b8e3ec6955b64290ad47c0f43dcda73 (diff)
downloadQt-5480e3b68da98253ae6ec58bd0db0075225a4e22.zip
Qt-5480e3b68da98253ae6ec58bd0db0075225a4e22.tar.gz
Qt-5480e3b68da98253ae6ec58bd0db0075225a4e22.tar.bz2
Cleanup & remove unused function overloads from QEgl* APIs
This should make stubbing out these APIs slightly easier. Reviewed-By: TrustMe
Diffstat (limited to 'src/gui/egl')
-rw-r--r--src/gui/egl/qegl.cpp58
-rw-r--r--src/gui/egl/qegl_p.h5
-rw-r--r--src/gui/egl/qeglcontext_p.h6
-rw-r--r--src/gui/egl/qeglproperties.cpp14
-rw-r--r--src/gui/egl/qeglproperties_p.h2
5 files changed, 1 insertions, 84 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 0fe5cbe..bf9f530 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -484,42 +484,6 @@ bool QEglContext::swapBuffers(EGLSurface surface)
return ok;
}
-// Wait for native rendering operations to complete before starting
-// to use OpenGL/OpenVG operations.
-void QEglContext::waitNative()
-{
-#ifdef EGL_CORE_NATIVE_ENGINE
- eglWaitNative(EGL_CORE_NATIVE_ENGINE);
-#endif
-}
-
-// Wait for client OpenGL/OpenVG operations to complete before
-// using native rendering operations.
-void QEglContext::waitClient()
-{
-#ifdef EGL_OPENGL_ES_API
- if (apiType == QEgl::OpenGL) {
- eglBindAPI(EGL_OPENGL_ES_API);
- eglWaitClient();
- }
-#else
- if (apiType == QEgl::OpenGL)
- eglWaitGL();
-#endif
-#ifdef EGL_OPENVG_API
- if (apiType == QEgl::OpenVG) {
- eglBindAPI(EGL_OPENVG_API);
- eglWaitClient();
- }
-#endif
-}
-
-// Query the value of a configuration attribute.
-bool QEglContext::configAttrib(int name, EGLint *value) const
-{
- return eglGetConfigAttrib(QEgl::display(), cfg, name, value);
-}
-
int QEglContext::configAttrib(int name) const
{
EGLint value;
@@ -530,12 +494,6 @@ int QEglContext::configAttrib(int name) const
return EGL_DONT_CARE;
}
-QEglProperties QEglContext::configProperties() const
-{
- return QEglProperties(config());
-}
-
-
typedef EGLImageKHR (EGLAPIENTRY *_eglCreateImageKHR)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLint*);
typedef EGLBoolean (EGLAPIENTRY *_eglDestroyImageKHR)(EGLDisplay, EGLImageKHR);
@@ -673,22 +631,6 @@ QString QEgl::errorString(EGLint code)
}
}
-QString QEgl::errorString()
-{
- return errorString(error());
-}
-
-void QEgl::clearError()
-{
- eglGetError();
-}
-
-EGLint QEgl::error()
-{
- return eglGetError();
-}
-
-
// Dump all of the EGL configurations supported by the system.
void QEgl::dumpAllConfigs()
{
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index 6345d5d..83bdb5e 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -182,10 +182,7 @@ namespace QEgl {
Q_GUI_EXPORT void dumpAllConfigs();
- Q_GUI_EXPORT void clearError();
- Q_GUI_EXPORT EGLint error();
- Q_GUI_EXPORT QString errorString(EGLint code);
- Q_GUI_EXPORT QString errorString();
+ Q_GUI_EXPORT QString errorString(EGLint code = eglGetError());
Q_GUI_EXPORT QString extensions();
Q_GUI_EXPORT bool hasExtension(const char* extensionName);
diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h
index 7eec7eb..ccde00d 100644
--- a/src/gui/egl/qeglcontext_p.h
+++ b/src/gui/egl/qeglcontext_p.h
@@ -85,10 +85,6 @@ public:
bool lazyDoneCurrent();
bool swapBuffers(EGLSurface surface);
- void waitNative();
- void waitClient();
-
- bool configAttrib(int name, EGLint *value) const;
int configAttrib(int name) const;
EGLContext context() const { return ctx; }
@@ -99,8 +95,6 @@ public:
EGLConfig config() const { return cfg; }
void setConfig(EGLConfig config) { cfg = config; }
- QEglProperties configProperties() const;
-
private:
QEgl::API apiType;
EGLContext ctx;
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index b34d2c3..5543547 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -292,20 +292,6 @@ static void addTag(QString& str, const QString& tag)
str += tag;
}
-void QEglProperties::dumpAllConfigs()
-{
- EGLint count = 0;
- eglGetConfigs(QEgl::display(), 0, 0, &count);
- if (count < 1)
- return;
-
- EGLConfig *configs = new EGLConfig [count];
- eglGetConfigs(QEgl::display(), configs, count, &count);
- for (EGLint index = 0; index < count; ++index)
- qWarning() << QEglProperties(configs[index]).toString();
- delete [] configs;
-}
-
// Convert a property list to a string suitable for debug output.
QString QEglProperties::toString() const
{
diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h
index eebcf72..b1f9642 100644
--- a/src/gui/egl/qeglproperties_p.h
+++ b/src/gui/egl/qeglproperties_p.h
@@ -90,8 +90,6 @@ public:
QString toString() const;
- static void dumpAllConfigs();
-
private:
QVarLengthArray<int> props;
};