summaryrefslogtreecommitdiffstats
path: root/src/compositor/hardware_integration
diff options
context:
space:
mode:
authorJan Arne Petersen <jan.petersen@kdab.com>2013-08-08 22:23:10 +0200
committerAndy Nichols <andy.nichols@digia.com>2013-08-09 10:55:00 +0200
commit68d3df7343ee5b40c1e677c728510d6b7b171b83 (patch)
tree74dd9e5859e10c42d9d846cb99e98c76f89bb514 /src/compositor/hardware_integration
parent8db53e4f5978363cc92d8700e0f902687dc7b7e8 (diff)
Do not rely on deprecated wl_buffer struct
wl_buffer objects are not necessary deprecated wl_buffer structs anymore. See for example the mesa commit: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d29b5271a2e66fc78436be31ed6748ff006f0cb Add a bufferSize() method to QWaylandGraphicsHardwareIntegration to query the size of the buffer (instead of using width and height from the wl_buffer struct). Use wl_resource instead of wl_buffer as argument type in the QWaylandGraphicsHardwareIntegration methods. Change-Id: Id7ca7e84c2abe31f7448fe59c2d0005edcb4ec25 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/compositor/hardware_integration')
-rw-r--r--src/compositor/hardware_integration/qwaylandgraphicshardwareintegration.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compositor/hardware_integration/qwaylandgraphicshardwareintegration.h b/src/compositor/hardware_integration/qwaylandgraphicshardwareintegration.h
index 373880440..b8cc90fb4 100644
--- a/src/compositor/hardware_integration/qwaylandgraphicshardwareintegration.h
+++ b/src/compositor/hardware_integration/qwaylandgraphicshardwareintegration.h
@@ -66,14 +66,16 @@ public:
/** Bind the Wayland buffer to the textureId. The correct context is the current context,
so there is no need to do makeCurrent in this function.
**/
- virtual GLuint createTextureFromBuffer(struct wl_buffer *buffer, QOpenGLContext *context) = 0;
- virtual bool isYInverted(struct wl_buffer *) const { return true; }
+ virtual GLuint createTextureFromBuffer(struct ::wl_resource *buffer, QOpenGLContext *context) = 0;
+ virtual bool isYInverted(struct ::wl_resource *) const { return true; }
virtual bool setDirectRenderSurface(QWaylandSurface *) {return false;}
- virtual void *lockNativeBuffer(struct wl_buffer *, QOpenGLContext *) const { return 0; }
+ virtual void *lockNativeBuffer(struct ::wl_resource *, QOpenGLContext *) const { return 0; }
virtual void unlockNativeBuffer(void *, QOpenGLContext *) const { return; }
+ virtual QSize bufferSize(struct ::wl_resource *) const { return QSize(); }
+
protected:
QWaylandCompositor *m_compositor;
};