diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-09-02 12:33:57 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-09-03 12:13:09 (GMT) |
commit | 4feb152405e96125b6be2807d515293e3f25ab1a (patch) | |
tree | 52b0be39e7f435db7f7e41ed73a2bc53e01f4c8e /src/gui/painting/qpainter.cpp | |
parent | d4a4b01f2f08a9031d692344d0d264de472da25e (diff) | |
download | Qt-4feb152405e96125b6be2807d515293e3f25ab1a.zip Qt-4feb152405e96125b6be2807d515293e3f25ab1a.tar.gz Qt-4feb152405e96125b6be2807d515293e3f25ab1a.tar.bz2 |
Added trace graphics system for painting performance profiling.
When running an application with graphics system trace everything that
gets painted to the window surface is proxied through a QPaintBuffer,
which is then both streamed to a trace file and replayed on a raster
window surface. The trace file can then be replayed with
tools/qttracereplay to measure pure painting performance.
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index ed400df..a6bea76 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -162,6 +162,9 @@ static bool qt_painter_thread_test(int devType, const char *what, bool extraCond void QPainterPrivate::checkEmulation() { Q_ASSERT(extended); + if (extended->flags() & QPaintEngineEx::DoNotEmulate) + return; + bool doEmulation = false; if (state->bgMode == Qt::OpaqueMode) doEmulation = true; @@ -1835,11 +1838,6 @@ bool QPainter::end() return true; } - if (d->states.size() > 1) { - qWarning("QPainter::end: Painter ended with %d saved states", - d->states.size()); - } - bool ended = true; if (d->engine->isActive()) { @@ -1853,6 +1851,11 @@ bool QPainter::end() } } + if (d->states.size() > 1) { + qWarning("QPainter::end: Painter ended with %d saved states", + d->states.size()); + } + if (d->engine->autoDestruct()) { delete d->engine; } |