diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-27 10:00:24 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-27 10:00:24 (GMT) |
commit | fdd29c588801b0c50a8d85c43c7754bc6e988883 (patch) | |
tree | 1337e95f2e8dbae5c3d825c304245f2abb2fd22a /src/opengl | |
parent | a46adcd714ec7c71c926511a7c29a8b29dbc1035 (diff) | |
download | Qt-fdd29c588801b0c50a8d85c43c7754bc6e988883.zip Qt-fdd29c588801b0c50a8d85c43c7754bc6e988883.tar.gz Qt-fdd29c588801b0c50a8d85c43c7754bc6e988883.tar.bz2 |
Make use of QVectorPath::isConvex() to speed up rounded rect filling
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 |
1 files changed, 1 insertions, 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()); |