summaryrefslogtreecommitdiffstats
path: root/src/render/texture/qabstracttexture_p.h
diff options
context:
space:
mode:
authorWieland Hagen <wieland.hagen@kdab.com>2016-12-12 12:53:53 +0700
committerSean Harmer <sean.harmer@kdab.com>2017-01-30 18:56:10 +0000
commit0010aa249244ff801af62e73a4b121fbd1491d73 (patch)
treee91f7f9358d1a5fbbb0751685ea9d9d24eec7b6e /src/render/texture/qabstracttexture_p.h
parentfb4c4abbc4beb9673654c318135f096013272d87 (diff)
Add Qt3DExtras::QTextureAtlas class
areallocator is copied from qtdeclarative/src/quick/scenegraph/util. We could link to QtQuick to use this allocator from the private headers, but this would introduce a hard dependency on QtQuick that Qt3DExtras doesn't yet have. Image data for texture atlasses are stored inside QTextureAtlasData structures, which are shared between 1. the frontend QTextureAtlas node, and 2. the texture generators that are updated each time something is added to the atlas If we didn't share this data, we would have to copy the current QImage that stores the current state of the texture atlas, each time that a new sub-image is added. This would result in considerable memory copying overhead. By sharing the data, we can just add new sub-images to the shared data structure, and update the texture generator. This may happen dozens of times within one frame. When the backend texture loading job is executed, it will copy all the new sub-images into the overall texture image, and create the texture data from that image. This way, exactly zero image copying overhead happens in the frontend thread. Change-Id: I8c418bf335afd1363ad7cefdf81778e4075038e8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/texture/qabstracttexture_p.h')
-rw-r--r--src/render/texture/qabstracttexture_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/texture/qabstracttexture_p.h b/src/render/texture/qabstracttexture_p.h
index 7f5a32c94..c245a78af 100644
--- a/src/render/texture/qabstracttexture_p.h
+++ b/src/render/texture/qabstracttexture_p.h
@@ -56,12 +56,13 @@
#include <Qt3DRender/qabstracttexture.h>
#include <Qt3DRender/qtexturewrapmode.h>
#include <Qt3DRender/qtexturegenerator.h>
+#include <Qt3DRender/private/qt3drender_global_p.h>
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class Q_AUTOTEST_EXPORT QAbstractTexturePrivate : public Qt3DCore::QNodePrivate
+class QT3DRENDERSHARED_PRIVATE_EXPORT QAbstractTexturePrivate : public Qt3DCore::QNodePrivate
{
public :
QAbstractTexturePrivate();