summaryrefslogtreecommitdiffstats
path: root/src/compositor/hardware_integration
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-03-01 18:16:23 +0100
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-03-02 13:41:05 +0100
commit70e1dcbff0728ab19d741a77ecd5c9261c4922fe (patch)
treeec1c6a4be7dd88aafb2c9219c398c367ddb572fd /src/compositor/hardware_integration
parent05eb5da1c80411242947a604fa41eaab7a0bd48f (diff)
Improve wayland_cast and introduce resolve to simplify code.
Resolves the wl_resource by accessing the data member. Change-Id: I10912acea0a3ca6abbc067d07d43a46ec65a77aa Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/compositor/hardware_integration')
-rw-r--r--src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp4
-rw-r--r--src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp4
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp b/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
index 6047a624c..88f5a1ce1 100644
--- a/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
+++ b/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
@@ -102,7 +102,7 @@ void XCompositeEglIntegration::initializeHardware(Wayland::Display *waylandDispl
GLuint XCompositeEglIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpenGLContext *)
{
- XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer *>(buffer);
+ XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer>(buffer);
Pixmap pixmap = XCompositeNameWindowPixmap(mDisplay, compositorBuffer->window());
QVector<EGLint> eglConfigSpec = eglbuildSpec();
@@ -145,6 +145,6 @@ GLuint XCompositeEglIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpe
bool XCompositeEglIntegration::isYInverted(wl_buffer *buffer) const
{
- XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer *>(buffer);
+ XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer>(buffer);
return compositorBuffer->isYInverted();
}
diff --git a/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp b/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
index a6aaba714..b8a860835 100644
--- a/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
+++ b/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
@@ -122,7 +122,7 @@ void XCompositeGLXIntegration::initializeHardware(Wayland::Display *waylandDispl
GLuint XCompositeGLXIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpenGLContext *)
{
- XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer *>(buffer);
+ XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer>(buffer);
Pixmap pixmap = XCompositeNameWindowPixmap(mDisplay, compositorBuffer->window());
QVector<int> glxConfigSpec = qglx_buildSpec();
@@ -155,6 +155,6 @@ GLuint XCompositeGLXIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpe
bool XCompositeGLXIntegration::isYInverted(wl_buffer *buffer) const
{
- XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer *>(buffer);
+ XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer>(buffer);
return compositorBuffer->isYInverted();
}
diff --git a/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp b/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp
index 6c886a491..46380fbf2 100644
--- a/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp
+++ b/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp
@@ -67,10 +67,10 @@ XCompositeHandler::XCompositeHandler(Wayland::Compositor *compositor, Display *d
void XCompositeHandler::createBuffer(struct wl_client *client, uint32_t id, Window window, const QSize &size)
{
XCompositeBuffer *buffer = new XCompositeBuffer(mCompositor, window, size);
- Wayland::addClientResource(client,&buffer->base()->resource,
- id,&wl_buffer_interface,
- &XCompositeBuffer::buffer_interface,
- XCompositeBuffer::delete_resource);
+ buffer->addClientResource(client, &buffer->base()->resource,
+ id,&wl_buffer_interface,
+ &XCompositeBuffer::buffer_interface,
+ XCompositeBuffer::delete_resource);
}
void XCompositeHandler::xcomposite_bind_func(struct wl_client *client, void *data, uint32_t version, uint32_t id)