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/text/qstatictext.h | |
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/text/qstatictext.h')
-rw-r--r-- | src/gui/text/qstatictext.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index de2fdb3..d79d887 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -73,6 +73,9 @@ public: void prepare(const QTransform &matrix, const QFont &font); + void setUseBackendOptimizations(bool on); + bool useBackendOptimizations() const; + QStaticText &operator=(const QStaticText &); bool operator==(const QStaticText &) const; bool operator!=(const QStaticText &) const; |