Disable blending of opaque Rectangle elements
authorGunnar Sletta <gunnar.sletta@digia.com>
Tue, 15 Jan 2013 14:39:10 +0000 (15:39 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 17 Jan 2013 08:24:57 +0000 (09:24 +0100)
Change-Id: If456248c10c24c3d2f2a383f29e72c74d2dee8bf
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
src/quick/scenegraph/qsgdefaultrectanglenode.cpp

index 4d5094d..6c71912 100644 (file)
@@ -338,6 +338,9 @@ void QSGDefaultRectangleNode::update()
         updateGeometry();
         m_dirty_geometry = false;
     }
+    m_material.setFlag(QSGMaterial::Blending, (m_gradient_stops.size() > 0 && !m_gradient_is_opaque)
+                                               || m_color.alpha() < 255
+                                               || (m_pen_width > 0 && m_border_color.alpha() < 255));
 }
 
 void QSGDefaultRectangleNode::updateGeometry()