OpenCoverage

qsgtexture.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgtexture.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QSGTexturePrivate;-
5class __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: return reinterpret_cast<QSGTexturePrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickpainteditem
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • ...
reinterpret_cast<QSGTexturePrivate *>(qGetPtrHelper(d_ptr));
executed 135549 times by 37 tests: return reinterpret_cast<QSGTexturePrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickpainteditem
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • ...
} inline const QSGTexturePrivate* d_func() const { return
executed 9589 times by 35 tests: return reinterpret_cast<const QSGTexturePrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickpainteditem
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
reinterpret_cast<const QSGTexturePrivate *>(qGetPtrHelper(d_ptr));
executed 9589 times by 35 tests: return reinterpret_cast<const QSGTexturePrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickpainteditem
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
} friend class QSGTexturePrivate;
9589-135549
17-
18public:-
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-
73protected:-
74 QSGTexture(QSGTexturePrivate &dd);-
75};-
76-
77QRectF 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: return QRectF(r.x() + rect.x() * sx, r.y() + rect.y() * sy, rect.width() * sx, rect.height() * sy);
Executed by:
  • tst_nodestest
  • tst_qquickframebufferobject
QRectF(r.x() + rect.x() * 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:
  • tst_nodestest
  • tst_qquickframebufferobject
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:
  • tst_nodestest
  • tst_qquickframebufferobject
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:
  • tst_nodestest
  • tst_qquickframebufferobject
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:
  • tst_nodestest
  • tst_qquickframebufferobject
56
89}-
90-
91-
92class __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 {};-
103public:-
104 virtual bool updateTexture() = 0;-
105};-
106-
107-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0