diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-05-28 13:31:46 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:28:45 (GMT) |
commit | 0e650ed3a8e7e4bdf4c9d3eefd667d4abb318c5a (patch) | |
tree | 08fc16b98562996f96fa916d7f575aecfc0782eb /src/gui | |
parent | e506c0816dadd336e8151a0af504bd8b814bbaf3 (diff) | |
download | Qt-0e650ed3a8e7e4bdf4c9d3eefd667d4abb318c5a.zip Qt-0e650ed3a8e7e4bdf4c9d3eefd667d4abb318c5a.tar.gz Qt-0e650ed3a8e7e4bdf4c9d3eefd667d4abb318c5a.tar.bz2 |
simplify opacity handling in QGraphicsItem
Greatly simplify how we handle opacity and store it as a member in
QGraphicsItemPrivate. Remove the caching of effectiveOpacity. It's
faster to calculate it on the fly, and the recursive painting algorithm
will make even that need go away.
Reviewed-by: Andreas
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 4deb6e5..aac1795 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -272,9 +272,7 @@ public: inline bool childrenCombineOpacity() const { - if (!children.size()) - return true; - if (flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren) + if (!children.size() || flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren) return false; for (int i = 0; i < children.size(); ++i) { @@ -347,7 +345,7 @@ public: quint32 dirtyClipPath : 1; quint32 emptyClipPath : 1; quint32 inSetPosHelper : 1; - quint32 unused : 1; + quint32 unused : 3; // New 32 bits quint32 flags : 11; |