diff options
author | aavit <qt-info@nokia.com> | 2010-09-07 10:57:38 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2010-09-07 10:57:38 (GMT) |
commit | bf12d2047b00eb88d96f2767b07c47bbb8df6b89 (patch) | |
tree | a212787a0150f0058a410d2084292a14ac22c0d1 /tests/arthur/common | |
parent | b146492b9319c80bde174f1a188ece89963eae3a (diff) | |
download | Qt-bf12d2047b00eb88d96f2767b07c47bbb8df6b89.zip Qt-bf12d2047b00eb88d96f2767b07c47bbb8df6b89.tar.gz Qt-bf12d2047b00eb88d96f2767b07c47bbb8df6b89.tar.bz2 |
Improve servers storage directory structure
- support different pixel formats for same engine
- separate baselines per hostname
Diffstat (limited to 'tests/arthur/common')
-rw-r--r-- | tests/arthur/common/baselineprotocol.cpp | 26 | ||||
-rw-r--r-- | tests/arthur/common/baselineprotocol.h | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index 24b5b8c..417474d 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -85,6 +85,32 @@ QString ImageItem::engineAsString() const return QLatin1String("Unknown"); } +QString ImageItem::formatAsString() const +{ + static const int numFormats = 16; + static const char *formatNames[numFormats] = { + "Invalid", + "Mono", + "MonoLSB", + "Indexed8", + "RGB32", + "ARGB32", + "ARGB32-Premult", + "RGB16", + "ARGB8565-Premult", + "RGB666", + "ARGB6666-Premult", + "RGB555", + "ARGB8555-Premult", + "RGB888", + "RGB444", + "ARGB4444-Premult" + }; + if (renderFormat < 0 || renderFormat >= numFormats) + return QLatin1String("UnknownFormat"); + return QLatin1String(formatNames[renderFormat]); +} + QDataStream & operator<< (QDataStream &stream, const ImageItem &ii) { stream << ii.scriptName << ii.scriptChecksum << quint8(ii.status) << quint8(ii.renderFormat) diff --git a/tests/arthur/common/baselineprotocol.h b/tests/arthur/common/baselineprotocol.h index 9ec1ef4..b3e853d 100644 --- a/tests/arthur/common/baselineprotocol.h +++ b/tests/arthur/common/baselineprotocol.h @@ -32,6 +32,7 @@ public: ImageItem &operator=(const ImageItem &other); static quint64 computeChecksum(const QImage& image); QString engineAsString() const; + QString formatAsString() const; enum ItemStatus { Ok = 0, |