summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-02-18 10:58:03 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2010-02-18 12:48:56 (GMT)
commit37d4bde65a28a10efdd9c09b88007acd7339629a (patch)
treec6b502994ab7c754a591f667d8212d33a72c8ebc /src/plugins/graphicssystems
parent5cd93666050076053d547d1b3ba4041b8fae58ec (diff)
downloadQt-37d4bde65a28a10efdd9c09b88007acd7339629a.zip
Qt-37d4bde65a28a10efdd9c09b88007acd7339629a.tar.gz
Qt-37d4bde65a28a10efdd9c09b88007acd7339629a.tar.bz2
Reduced the memory footprint of qttrace files.
A couple of improvements have been made: * Use single precision floats for the traces. * Reduce the number of variant wrapped transforms by introducing a new translate command. * Reduce the number of bytes streamed per image / pixmap draw command. * Add versioning info to qttrace files to be more future proof. Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/plugins/graphicssystems')
-rw-r--r--src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
index 13044f4..6bf9d6b 100644
--- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
+++ b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
@@ -82,8 +82,13 @@ QTraceWindowSurface::~QTraceWindowSurface()
QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId));
if (outputFile.open(QIODevice::WriteOnly)) {
QDataStream out(&outputFile);
- out.writeBytes("qttrace", 7);
- out << *buffer << updates;
+ out.setFloatingPointPrecision(QDataStream::SinglePrecision);
+
+ out.writeBytes("qttraceV2", 9);
+
+ uint version = 1;
+
+ out << version << *buffer << updates;
}
delete buffer;
}