From f49a26623650d3bcc2f6759b3c32acee0ac3c051 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 23 Mar 2012 14:39:34 +0100 Subject: [PATCH] Make API in QPlatformSharedGraphicsCache a little more generic Use EGL extensions for some things to allow serialization instead of the somewhat specialized serializeBuffer() function. Change-Id: I8d15e85bfb80d12fa953ba094564ddfca1aa6d6a Reviewed-by: Jiang Jiang --- src/gui/kernel/qplatformsharedgraphicscache_qpa.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qplatformsharedgraphicscache_qpa.h b/src/gui/kernel/qplatformsharedgraphicscache_qpa.h index d59cd7c3c8..b2a302702d 100644 --- a/src/gui/kernel/qplatformsharedgraphicscache_qpa.h +++ b/src/gui/kernel/qplatformsharedgraphicscache_qpa.h @@ -76,17 +76,18 @@ public: const QVector &items) = 0; Q_INVOKABLE virtual void releaseItems(const QByteArray &cacheId, const QVector &itemIds) = 0; - virtual void serializeBuffer(void *bufferId, QByteArray *serializedData, int *fileDescriptor) const = 0; virtual uint textureIdForBuffer(void *bufferId) = 0; virtual void referenceBuffer(void *bufferId) = 0; virtual bool dereferenceBuffer(void *bufferId) = 0; + virtual QSize sizeOfBuffer(void *bufferId) = 0; + virtual void *eglImageForBuffer(void *bufferId) = 0; Q_SIGNALS: void itemsMissing(const QByteArray &cacheId, const QVector &itemIds); - void itemsAvailable(const QByteArray &cacheId, void *bufferId, const QSize &bufferSize, + void itemsAvailable(const QByteArray &cacheId, void *bufferId, const QVector &itemIds, const QVector &positionsInBuffer); void itemsInvalidated(const QByteArray &cacheId, const QVector &itemIds); - void itemsUpdated(const QByteArray &cacheId, void *bufferId, const QSize &bufferSize, + void itemsUpdated(const QByteArray &cacheId, void *bufferId, const QVector &itemIds, const QVector &positionsInBuffer); };