From fdd29c588801b0c50a8d85c43c7754bc6e988883 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 27 Oct 2009 11:00:24 +0100 Subject: Make use of QVectorPath::isConvex() to speed up rounded rect filling Reviewed-by: Samuel --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index a0810bc..b70810d 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -858,9 +858,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) QGLRect rect(points[0].x(), points[0].y(), points[2].x(), points[2].y()); prepareForDraw(currentBrush->isOpaque()); composite(rect); - } else if (path.shape() == QVectorPath::EllipseHint - || path.shape() == QVectorPath::ConvexPolygonHint) - { + } else if (path.isConvex()) { vertexCoordinateArray.clear(); vertexCoordinateArray.addPath(path, inverseScale, false); prepareForDraw(currentBrush->isOpaque()); -- cgit v0.12