mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
benchmark adjustment to recent changes
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
6763b8aa35
commit
8140dfda11
1 changed files with 2 additions and 17 deletions
|
@ -104,17 +104,13 @@ void paint_QTextLayout_cache(QPainter &p)
|
|||
paint_QTextLayout(p, true);
|
||||
}
|
||||
|
||||
void paint_QStaticText(QPainter &p, bool useOptimizations)
|
||||
void paint_QStaticText(QPainter &p)
|
||||
{
|
||||
static QStaticText *staticText[lines];
|
||||
static bool first = true;
|
||||
if (first) {
|
||||
for (int i = 0; i < lines; ++i) {
|
||||
staticText[i] = new QStaticText(strings[i]);
|
||||
if (useOptimizations)
|
||||
staticText[i]->setPerformanceHint(QStaticText::AggressiveCaching);
|
||||
else
|
||||
staticText[i]->setPerformanceHint(QStaticText::ModerateCaching);
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
@ -125,16 +121,6 @@ void paint_QStaticText(QPainter &p, bool useOptimizations)
|
|||
}
|
||||
}
|
||||
|
||||
void paint_QStaticText_noOptimizations(QPainter &p)
|
||||
{
|
||||
paint_QStaticText(p, false);
|
||||
}
|
||||
|
||||
void paint_QStaticText_optimizations(QPainter &p)
|
||||
{
|
||||
paint_QStaticText(p, true);
|
||||
}
|
||||
|
||||
void paint_QPixmapCachedText(QPainter &p)
|
||||
{
|
||||
static bool first = true;
|
||||
|
@ -310,8 +296,7 @@ struct FuncStructure {
|
|||
static const FuncStructure funcs[] = {
|
||||
{ "QTextLayoutNoCache", &paint_QTextLayout_noCache },
|
||||
{ "QTextLayoutWithCache", &paint_QTextLayout_cache },
|
||||
{ "QStaticTextNoBackendOptimizations", &paint_QStaticText_noOptimizations },
|
||||
{ "QStaticTextWithBackendOptimizations", &paint_QStaticText_optimizations },
|
||||
{ "QStaticText", &paint_QStaticText },
|
||||
{ "CachedText", &paint_QPixmapCachedText },
|
||||
{ "RoundedRect", &paint_RoundedRect },
|
||||
{ "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
|
||||
|
|
Loading…
Add table
Reference in a new issue