diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-01-29 15:53:39 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-01-29 15:53:39 (GMT) |
commit | da388773f581e251054abd037dc410ae52cfa69c (patch) | |
tree | 5801db3f2793ff9b9d418b25814db50880427550 /src/gui/painting/qpainter.cpp | |
parent | 951922772c0c5f8b8833c2793064f8c6ebeecd9c (diff) | |
download | Qt-da388773f581e251054abd037dc410ae52cfa69c.zip Qt-da388773f581e251054abd037dc410ae52cfa69c.tar.gz Qt-da388773f581e251054abd037dc410ae52cfa69c.tar.bz2 |
Improve performance of QStaticText on OpenGL by caching data on GPU
There's a big improvement to be seen in the OpenGL engine by caching
the vertex data for the QStaticText in VBOs. In order to have the
buffers properly disposed, I've implemented a userdata concept for
QStaticTextItem. By default, the optimizations will be turned off, and
can be turned on by using the useBackendOptimizations flag.
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 54eed03..521072f 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5800,6 +5800,7 @@ void QPainter::drawStaticText(const QPointF &position, const QStaticText &static textItem->glyphPositions[i].x += fx - oldX; textItem->glyphPositions[i].y += fy - oldY; } + textItem->userDataNeedsUpdate = true; } staticText_d->position = transformedPosition; |