mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +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);
|
paint_QTextLayout(p, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void paint_QStaticText(QPainter &p, bool useOptimizations)
|
void paint_QStaticText(QPainter &p)
|
||||||
{
|
{
|
||||||
static QStaticText *staticText[lines];
|
static QStaticText *staticText[lines];
|
||||||
static bool first = true;
|
static bool first = true;
|
||||||
if (first) {
|
if (first) {
|
||||||
for (int i = 0; i < lines; ++i) {
|
for (int i = 0; i < lines; ++i) {
|
||||||
staticText[i] = new QStaticText(strings[i]);
|
staticText[i] = new QStaticText(strings[i]);
|
||||||
if (useOptimizations)
|
|
||||||
staticText[i]->setPerformanceHint(QStaticText::AggressiveCaching);
|
|
||||||
else
|
|
||||||
staticText[i]->setPerformanceHint(QStaticText::ModerateCaching);
|
|
||||||
}
|
}
|
||||||
first = false;
|
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)
|
void paint_QPixmapCachedText(QPainter &p)
|
||||||
{
|
{
|
||||||
static bool first = true;
|
static bool first = true;
|
||||||
|
@ -310,8 +296,7 @@ struct FuncStructure {
|
||||||
static const FuncStructure funcs[] = {
|
static const FuncStructure funcs[] = {
|
||||||
{ "QTextLayoutNoCache", &paint_QTextLayout_noCache },
|
{ "QTextLayoutNoCache", &paint_QTextLayout_noCache },
|
||||||
{ "QTextLayoutWithCache", &paint_QTextLayout_cache },
|
{ "QTextLayoutWithCache", &paint_QTextLayout_cache },
|
||||||
{ "QStaticTextNoBackendOptimizations", &paint_QStaticText_noOptimizations },
|
{ "QStaticText", &paint_QStaticText },
|
||||||
{ "QStaticTextWithBackendOptimizations", &paint_QStaticText_optimizations },
|
|
||||||
{ "CachedText", &paint_QPixmapCachedText },
|
{ "CachedText", &paint_QPixmapCachedText },
|
||||||
{ "RoundedRect", &paint_RoundedRect },
|
{ "RoundedRect", &paint_RoundedRect },
|
||||||
{ "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
|
{ "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
|
||||||
|
|
Loading…
Add table
Reference in a new issue