summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qtexturefiledata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port from container.count()/length() to size()Marc Mutz2022-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make it possible to create QTextureFileData from imagesPaul Olav Tvete2022-05-271-16/+50
| | | | | | | | | | | | | Currently it is only possible to create a cube map texture from a single compressed texture file. In many cases, the cubemap asset is available as a set of individual image files. Making it possible to use these images directly will make the development process more efficient, and will reduce the size of the assets needed to be shipped with demos and examples. Task-number: QTBUG-103191 Change-Id: Icd12548e2dab55ec2123804cb28353cbf29926ce Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Gui: Do not depend on transitive includesFabian Kosmale2022-03-171-1/+3
| | | | | Change-Id: I27321235d9c8428de0cff1e22a618299b9e5a97f Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QTextureFileData: support key value metadataJonas Karlsson2021-02-091-0/+12
| | | | | | | Task-Id: QTBUG-76970 Pick-to: 6.1 Change-Id: I9dba1b373250cea4d0c806997290a7afcdc900d7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add face support to texture fileJonas Karlsson2021-01-211-34/+74
| | | | | | Task-Id: QTBUG-76970 Change-Id: I3bbd43357c7fcce8949522b089a4572b948f08f4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add getDataView() method to QTextureFileDataJonas Karlsson2020-12-291-0/+11
| | | | | | | | | | This method will return a QByteArrayView of the data range corresponding to the level. This avoids a leaky abstraction by moving the needed data pointer arithmetic from the caller to the method. It will also make it easier adding cubemap support in the future. Change-Id: I2415bd88365d8d69ba14aefc77f5f1117f9e0033 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use QList instead of QVector in gui implementationJarek Kobus2020-07-071-2/+2
| | | | | | | Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove QOpenGLTexture dependency from QTextureFileDataJohan Klokkhammer Helsing2020-01-031-11/+1
| | | | | | | | Just print the hex value of the format. Task-number: QTBUG-74409 Change-Id: I0441eda050735325f7686532b17ef765f71bec9b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-1/+1
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTextureFileData: Fix build with -no-openglJüri Valdmann2018-08-061-0/+1
| | | | | | | Need to include <QSize> for operator<<(QDebug, const QSize &). Change-Id: I4857e9b43918243af66cc09ff352619595c081c9 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Make local symbols of some leaked namesThiago Macieira2018-08-031-1/+1
| | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add API for reading and decoding graphical texture filesEirik Aavitsland2018-07-241-0/+279
Add a framework for reading and decoding stored graphical texture file formats. Includes decoders for the PKM and KTX formats. This is basically the same texture file reading that was added to qtdeclarative for 5.11, but has been refactored to be independent of the scenegraph and opengl. Task-number: QTBUG-67026 Change-Id: I87d8117550d8a2112f4f58c03e9ac6b3249cbc5a Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>