summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-28 16:37:15 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-07 02:59:17 (GMT)
commit2ec1b27e49638d494d1a0bb5983a64d05eebb64a (patch)
tree4380673a503261ab0b4a341f594ec429506928fe /src
parent0972f9e19b4d07300fe98a802591341ea3e973f4 (diff)
downloadQt-2ec1b27e49638d494d1a0bb5983a64d05eebb64a.zip
Qt-2ec1b27e49638d494d1a0bb5983a64d05eebb64a.tar.gz
Qt-2ec1b27e49638d494d1a0bb5983a64d05eebb64a.tar.bz2
Added convex polygon optimization to QGL2PaintEngineExPrivate::fill().
(cherry picked from commit d846af0de2ee2b3b76f81f2c0fd3ccceb645b511)
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 0af8e71..70d1ae9 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -876,16 +876,15 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
if (path.shape() == QVectorPath::RectangleHint) {
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) {
+ } else if (path.shape() == QVectorPath::EllipseHint
+ || path.shape() == QVectorPath::ConvexPolygonHint)
+ {
vertexCoordinateArray.clear();
vertexCoordinateArray.addPath(path, inverseScale);
prepareForDraw(currentBrush->isOpaque());
drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN);
- }
- else {
+ } else {
// The path is too complicated & needs the stencil technique
vertexCoordinateArray.clear();
vertexCoordinateArray.addPath(path, inverseScale);