summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-29 16:53:39 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-29 16:53:39 +0100
commitda388773f581e251054abd037dc410ae52cfa69c (patch)
tree5801db3f2793ff9b9d418b25814db50880427550 /src/gui/text/qstatictext.h
parent951922772c0c5f8b8833c2793064f8c6ebeecd9c (diff)
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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index de2fdb3ae5..d79d887d6f 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;