aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2017-11-07 20:07:34 -0600
committerSimon Hausmann <simon.hausmann@qt.io>2018-01-31 08:13:31 +0000
commit07f9ca1759e35f1eb497fe2f1ad4b7ba71b69b5c (patch)
tree5dd23f1f31ac3df199572c3add1f25972ec4ec69 /src/quick/scenegraph/qsgcontext.cpp
parenteace041161a03a849d3896af65493b7885cecc04 (diff)
Basic working compressed texture atlas
This adds experimental automatic atlasing of ETC-compressed textures (to be expanded to additional formats), similar to existing atlas support of QImages. It is off by default, and can be enabled with QSG_ENABLE_COMPRESSED_ATLAS=1. [ChangeLog] Add experimental automatic atlasing of ETC-compressed textures (can be enabled with QSG_ENABLE_COMPRESSED_ATLAS=1) Change-Id: Ia66971f51299d082a569bdfaadb662a3e522bd79 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index fb66a6ebb1..e5334d59e1 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -404,6 +404,20 @@ void QSGRenderContext::textureFactoryDestroyed(QObject *o)
m_mutex.unlock();
}
+/*!
+ Return the texture corresponding to a texture factory.
+
+ This may optionally manipulate the texture in some way; for example by returning
+ an atlased texture.
+
+ This function is not a replacement for textureForFactory; both should be used
+ for a single texture (this might atlas, while the other might cache).
+*/
+QSGTexture *QSGRenderContext::compressedTextureForFactory(const QSGCompressedTextureFactory *) const
+{
+ return nullptr;
+}
+
#include "qsgcontext.moc"
#include "moc_qsgcontext_p.cpp"