aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software
diff options
context:
space:
mode:
authorMagdalena Stojek <[email protected]>2025-02-05 10:05:53 +0100
committerMagdalena Stojek <[email protected]>2025-03-05 08:05:09 +0100
commit9d20c0c16cda969651b6970436f9820c3cd17137 (patch)
tree7a23d7b61b40310dcd17964e061685173031f40b /src/quick/scenegraph/adaptations/software
parent59889fed81265578e0e0e2b89fc60fe839c89c61 (diff)
Convert m_vertical and m_cornerPixmapIsDirty to bitfields
Convert m_vertical and m_cornerPixmapIsDirty from bool to bitfields in QSGSoftwareInternalRectangleNode for memory optimization. Fixes: QTBUG-133498 Change-Id: Idb1710a9198d75bb5a2addea828dec81bbf04f56 Reviewed-by: Shawn Rutledge <[email protected]>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp2
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode_p.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp
index e651eadac2..4866cf3bf1 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp
@@ -15,9 +15,9 @@ QSGSoftwareInternalRectangleNode::QSGSoftwareInternalRectangleNode()
, m_topRightRadius(0)
, m_bottomLeftRadius(0)
, m_bottomRightRadius(0)
+ , m_devicePixelRatio(1)
, m_vertical(true)
, m_cornerPixmapIsDirty(true)
- , m_devicePixelRatio(1)
, m_isTopLeftRadiusSet(false)
, m_isTopRightRadiusSet(false)
, m_isBottomLeftRadiusSet(false)
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode_p.h
index 2d02c9ad22..39c05ba98e 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode_p.h
@@ -69,13 +69,11 @@ private:
qreal m_bottomRightRadius;
QPen m_pen;
QBrush m_brush;
- bool m_vertical;
-
- bool m_cornerPixmapIsDirty;
QPixmap m_cornerPixmap;
-
qreal m_devicePixelRatio;
+ uint m_vertical : 1;
+ uint m_cornerPixmapIsDirty : 1;
uint m_isTopLeftRadiusSet : 1;
uint m_isTopRightRadiusSet : 1;
uint m_isBottomLeftRadiusSet : 1;