update server buffer interfaces
Change-Id: Ifc10b17deedc800167f3d03b2e4437e6b702ffa5 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
This commit is contained in:
parent
36ef74965d
commit
151d530b44
@ -1,5 +1,31 @@
|
|||||||
#include "qwaylandserverbufferintegration.h"
|
#include "qwaylandserverbufferintegration.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
QWaylandServerBuffer::QWaylandServerBuffer()
|
||||||
|
: m_user_data(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWaylandServerBuffer::~QWaylandServerBuffer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void QWaylandServerBuffer::setUserData(void *userData)
|
||||||
|
{
|
||||||
|
m_user_data = userData;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *QWaylandServerBuffer::userData() const
|
||||||
|
{
|
||||||
|
return m_user_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWaylandServerBuffer::Format QWaylandServerBuffer::format() const
|
||||||
|
{
|
||||||
|
return m_format;
|
||||||
|
}
|
||||||
|
|
||||||
QWaylandServerBufferIntegration::QWaylandServerBufferIntegration()
|
QWaylandServerBufferIntegration::QWaylandServerBufferIntegration()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -7,3 +33,4 @@ QWaylandServerBufferIntegration::~QWaylandServerBufferIntegration()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
@ -51,6 +51,32 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class QWaylandDisplay;
|
class QWaylandDisplay;
|
||||||
|
|
||||||
|
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBuffer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum Format {
|
||||||
|
RGBA32,
|
||||||
|
A8
|
||||||
|
};
|
||||||
|
|
||||||
|
QWaylandServerBuffer();
|
||||||
|
virtual ~QWaylandServerBuffer();
|
||||||
|
|
||||||
|
//creates new texture for buffer
|
||||||
|
virtual GLuint createTexture() = 0;
|
||||||
|
|
||||||
|
void setUserData(void *userData);
|
||||||
|
void *userData() const;
|
||||||
|
|
||||||
|
Format format() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Format m_format;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void *m_user_data;
|
||||||
|
};
|
||||||
|
|
||||||
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegration
|
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -59,13 +85,7 @@ public:
|
|||||||
|
|
||||||
virtual void initialize(QWaylandDisplay *display) = 0;
|
virtual void initialize(QWaylandDisplay *display) = 0;
|
||||||
|
|
||||||
//creates new texture for buffer
|
virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) = 0;
|
||||||
virtual GLuint createTextureFor(struct qt_server_buffer *buffer) = 0;
|
|
||||||
|
|
||||||
//does not clean up textures. Just lets server know that it does
|
|
||||||
//not intend to use the buffer anymore. Textures should have been
|
|
||||||
//deleted prior to calling this function
|
|
||||||
virtual void release(struct qt_server_buffer *buffer) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user