summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-01-06 12:26:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-06 13:12:32 +0100
commitcd1e9d036ff1354c65b016ba8af0d6d6bd7cea92 (patch)
treefc7ff2a2fc5c3f2862b3c0e46589fc44ee1f1a9f /src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
parentb2bfcec54cb46fa9e6555d3cb77ae6b995392ac6 (diff)
Revised createTextureFromBuffer
The context is not passed anymore to texture() and similar functions since they have to use the current context anyhow. createTextureFromBuffer() becomes bindTextureToBuffer() which is called with the texture bound. The integration can also provide its own texture in case the one created and managed by the surfacebuffer is not suitable. Change-Id: I1bfc4fe35c0e3db6081b47c551f20f4bca9aa04e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp')
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
index 1df6a4c99..a58827cee 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
@@ -112,7 +112,7 @@ void XCompositeGLXClientBufferIntegration::initializeHardware(QtWayland::Display
delete glContext;
}
-GLuint XCompositeGLXClientBufferIntegration::createTextureFromBuffer(struct ::wl_resource *buffer, QOpenGLContext *)
+void XCompositeGLXClientBufferIntegration::updateTextureFromBuffer(struct ::wl_resource *buffer)
{
XCompositeBuffer *compositorBuffer = XCompositeBuffer::fromResource(buffer);
Pixmap pixmap = XCompositeNameWindowPixmap(mDisplay, compositorBuffer->window());
@@ -135,14 +135,10 @@ GLuint XCompositeGLXClientBufferIntegration::createTextureFromBuffer(struct ::wl
XFree(configs);
- GLuint textureId;
- glGenTextures(1,&textureId);
- glBindTexture(GL_TEXTURE_2D, textureId);
m_glxBindTexImageEXT(mDisplay,glxPixmap,GLX_FRONT_EXT, 0);
//Do we need to change the api so that we do bind and release in the painevent?
//The specification states that when deleting the texture the color buffer is deleted
// m_glxReleaseTexImageEXT(mDisplay,glxPixmap,GLX_FRONT_EXT);
- return textureId;
}
bool XCompositeGLXClientBufferIntegration::isYInverted(struct ::wl_resource *buffer) const