summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-28 16:37:15 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-10-06 13:39:05 (GMT)
commitd846af0de2ee2b3b76f81f2c0fd3ccceb645b511 (patch)
tree48163cfedfb6ca470cc68be9f09a1828fac90c1f /src/opengl
parent6b623c04060d274c048c0d4c6dbc5a90d1c31604 (diff)
downloadQt-d846af0de2ee2b3b76f81f2c0fd3ccceb645b511.zip
Qt-d846af0de2ee2b3b76f81f2c0fd3ccceb645b511.tar.gz
Qt-d846af0de2ee2b3b76f81f2c0fd3ccceb645b511.tar.bz2
Added convex polygon optimization to QGL2PaintEngineExPrivate::fill().
Diffstat (limited to 'src/opengl')
-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);