From 0e650ed3a8e7e4bdf4c9d3eefd667d4abb318c5a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 28 May 2009 15:31:46 +0200 Subject: 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 --- src/gui/graphicsview/qgraphicsitem_p.h | 6 ++---- 1 file 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; -- cgit v0.12