From cd71ddd020d16dc06c5eb7f5d4d0988255d49cd9 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Tue, 12 Aug 2014 16:18:51 +0200 Subject: Use fillRect when appropriate This is the most common case and it is possible to use the accelerated blitter path, where as drawRect requires extra effort for the border and thus always uses the raster path. Change-Id: Ic4600b7247a86db5f79268c5ad5b02c331f51058 Reviewed-by: Simon Hausmann --- softwarecontext/rectanglenode.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/softwarecontext/rectanglenode.cpp b/softwarecontext/rectanglenode.cpp index 0c2575b3fd..643325ebcd 100644 --- a/softwarecontext/rectanglenode.cpp +++ b/softwarecontext/rectanglenode.cpp @@ -95,6 +95,8 @@ void RectangleNode::paint(QPainter *painter) painter->setBrush(m_brush); if (m_radius) painter->drawRoundedRect(m_rect, m_radius, m_radius); + else if (m_pen.style() == Qt::NoPen && m_stops.isEmpty()) + painter->fillRect(m_rect, m_color); else painter->drawRect(m_rect); } -- cgit v1.2.3