| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgtexture.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | class QSGTexturePrivate; | - |
| 5 | class __attribute__((visibility("default"))) QSGTexture : public QObject | - |
| 6 | { | - |
| 7 | public: | - |
| 8 | #pragma GCC diagnostic push | - |
| 9 | - | |
| 10 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
| 11 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - |
| 12 | #pragma GCC diagnostic ignored "-Wattributes" | - |
| 13 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
| 14 | #pragma GCC diagnostic pop | - |
| 15 | struct QPrivateSignal {}; | - |
| 16 | inline QSGTexturePrivate* d_func() { return executed 135549 times by 37 tests: reinterpret_cast<QSGTexturePrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QSGTexturePrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 135549 times by 37 tests: } inline const QSGTexturePrivate* d_func() const { returnreturn reinterpret_cast<QSGTexturePrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 9589 times by 35 tests: reinterpret_cast<const QSGTexturePrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QSGTexturePrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 9589 times by 35 tests: } friend class QSGTexturePrivate;return reinterpret_cast<const QSGTexturePrivate *>(qGetPtrHelper(d_ptr));Executed by:
| 9589-135549 |
| 17 | - | |
| 18 | public: | - |
| 19 | QSGTexture(); | - |
| 20 | ~QSGTexture() override; | - |
| 21 | - | |
| 22 | enum WrapMode { | - |
| 23 | Repeat, | - |
| 24 | ClampToEdge, | - |
| 25 | MirroredRepeat | - |
| 26 | }; | - |
| 27 | - | |
| 28 | enum Filtering { | - |
| 29 | None, | - |
| 30 | Nearest, | - |
| 31 | Linear | - |
| 32 | }; | - |
| 33 | - | |
| 34 | enum AnisotropyLevel { | - |
| 35 | AnisotropyNone, | - |
| 36 | Anisotropy2x, | - |
| 37 | Anisotropy4x, | - |
| 38 | Anisotropy8x, | - |
| 39 | Anisotropy16x | - |
| 40 | }; | - |
| 41 | - | |
| 42 | virtual int textureId() const = 0; | - |
| 43 | virtual QSize textureSize() const = 0; | - |
| 44 | virtual bool hasAlphaChannel() const = 0; | - |
| 45 | virtual bool hasMipmaps() const = 0; | - |
| 46 | - | |
| 47 | virtual QRectF normalizedTextureSubRect() const; | - |
| 48 | - | |
| 49 | virtual bool isAtlasTexture() const; | - |
| 50 | - | |
| 51 | virtual QSGTexture *removedFromAtlas() const; | - |
| 52 | - | |
| 53 | virtual void bind() = 0; | - |
| 54 | void updateBindOptions(bool force = false); | - |
| 55 | - | |
| 56 | void setMipmapFiltering(Filtering filter); | - |
| 57 | QSGTexture::Filtering mipmapFiltering() const; | - |
| 58 | - | |
| 59 | void setFiltering(Filtering filter); | - |
| 60 | QSGTexture::Filtering filtering() const; | - |
| 61 | - | |
| 62 | void setAnisotropyLevel(AnisotropyLevel level); | - |
| 63 | QSGTexture::AnisotropyLevel anisotropyLevel() const; | - |
| 64 | - | |
| 65 | void setHorizontalWrapMode(WrapMode hwrap); | - |
| 66 | QSGTexture::WrapMode horizontalWrapMode() const; | - |
| 67 | - | |
| 68 | void setVerticalWrapMode(WrapMode vwrap); | - |
| 69 | QSGTexture::WrapMode verticalWrapMode() const; | - |
| 70 | - | |
| 71 | inline QRectF convertToNormalizedSourceRect(const QRectF &rect) const; | - |
| 72 | - | |
| 73 | protected: | - |
| 74 | QSGTexture(QSGTexturePrivate &dd); | - |
| 75 | }; | - |
| 76 | - | |
| 77 | QRectF QSGTexture::convertToNormalizedSourceRect(const QRectF &rect) const | - |
| 78 | { | - |
| 79 | QSize s = textureSize(); | - |
| 80 | QRectF r = normalizedTextureSubRect(); | - |
| 81 | - | |
| 82 | qreal sx = r.width() / s.width(); | - |
| 83 | qreal sy = r.height() / s.height(); | - |
| 84 | - | |
| 85 | return executed 56 times by 2 tests: QRectF(r.x() + rect.x() * sx,return QRectF(r.x() + rect.x() * sx, r.y() + rect.y() * sy, rect.width() * sx, rect.height() * sy);Executed by:
executed 56 times by 2 tests: return QRectF(r.x() + rect.x() * sx, r.y() + rect.y() * sy, rect.width() * sx, rect.height() * sy);Executed by:
| 56 |
| 86 | r.y() + rect.y() * sy, executed 56 times by 2 tests: return QRectF(r.x() + rect.x() * sx, r.y() + rect.y() * sy, rect.width() * sx, rect.height() * sy);Executed by:
| 56 |
| 87 | rect.width() * sx, executed 56 times by 2 tests: return QRectF(r.x() + rect.x() * sx, r.y() + rect.y() * sy, rect.width() * sx, rect.height() * sy);Executed by:
| 56 |
| 88 | rect.height() * sy); executed 56 times by 2 tests: return QRectF(r.x() + rect.x() * sx, r.y() + rect.y() * sy, rect.width() * sx, rect.height() * sy);Executed by:
| 56 |
| 89 | } | - |
| 90 | - | |
| 91 | - | |
| 92 | class __attribute__((visibility("default"))) QSGDynamicTexture : public QSGTexture | - |
| 93 | { | - |
| 94 | public: | - |
| 95 | #pragma GCC diagnostic push | - |
| 96 | - | |
| 97 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
| 98 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - |
| 99 | #pragma GCC diagnostic ignored "-Wattributes" | - |
| 100 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
| 101 | #pragma GCC diagnostic pop | - |
| 102 | struct QPrivateSignal {}; | - |
| 103 | public: | - |
| 104 | virtual bool updateTexture() = 0; | - |
| 105 | }; | - |
| 106 | - | |
| 107 | - | |
| Switch to Source code | Preprocessed file |