From 2da1f6dd814381fde2a365a328de49761c507b3b Mon Sep 17 00:00:00 2001 From: Leandro Melo Date: Thu, 22 Jul 2010 11:54:20 +0200 Subject: Docs: Additional HTML extraction marks for enumerations. Reviewed-by: Martin Smith --- tools/qdoc3/htmlgenerator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9977df0..e840a7f 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4415,8 +4415,8 @@ void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType out() << "$$$" + func->name() + func->rawParameters().remove(' '); } } else if (node->type() == Node::Property) { - const PropertyNode *prop = static_cast(node); out() << "-prop"; + const PropertyNode *prop = static_cast(node); const NodeList &list = prop->functions(); foreach (const Node *propFuncNode, list) { if (propFuncNode->type() == Node::Function) { @@ -4424,6 +4424,10 @@ void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType out() << "$$$" + func->name() + func->rawParameters().remove(' '); } } + } else if (node->type() == Node::Enum) { + const EnumNode *enumNode = static_cast(node); + foreach (const EnumItem &item, enumNode->items()) + out() << "$$$" + item.name(); } } else if (markType == BriefMark) { out() << "-brief"; -- cgit v0.12 From 6240f4a990d2f0b4a4b24c823f8875ca3b8226a4 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 22 Jul 2010 13:16:35 +0200 Subject: Switch the default value for configure's -separate-debug-info to "no". The "yes" case slows us down on several occasions: (a) the CRC version used slows down loading debug info when debugging a Qt application significantly, (b) it does not work wit gdb 7.2's dwarf indexing (again, much slower startup), and (c) (less important) the stripping takes extra time for each of us when building Qt. The flag is still supported for distributions or individuals that want to use it. Reviewed-by: brad --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b92a3f7..ae23509 100755 --- a/configure +++ b/configure @@ -733,7 +733,7 @@ CFG_OPENSSL=auto CFG_PTMALLOC=no CFG_STL=auto CFG_PRECOMPILE=auto -CFG_SEPARATE_DEBUG_INFO=auto +CFG_SEPARATE_DEBUG_INFO=no CFG_SEPARATE_DEBUG_INFO_NOCOPY=no CFG_REDUCE_EXPORTS=auto CFG_MMX=auto @@ -2307,7 +2307,7 @@ fi if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then echo echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux" - echo "By default, Qt is built in release mode with separate debug information, so" + echo "Qt can be built in release mode with separate debug information, so" echo "-debug-and-release is not necessary anymore" echo fi -- cgit v0.12 From bf15a487e4e0b5d4edca232258526e0d3cf471a0 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Wed, 21 Jul 2010 19:54:56 +0200 Subject: Premultiply the color table instead of each pixel for image conversion When converting indexed images in place, each color was converted to premultiplied. Instead, we can just convert the color table like it is done in the non-in-place version. Reviewed-by: Kim --- src/gui/image/qimage.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index e5930ac..e8c01c7 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2343,6 +2343,9 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve data->colortable.resize(256); for (int i = 0; i < 256; ++i) data->colortable[i] = qRgb(i, i, i); + } else { + for (int i = 0; i < data->colortable.size(); ++i) + data->colortable[i] = PREMUL(data->colortable.at(i)); } const int tableSize = data->colortable.size() - 1; @@ -2352,11 +2355,11 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve for (int pixI = 0; pixI < width; ++pixI) { --src_data; --dest_data; - const uint pixel = data->colortable[qMin(tableSize, *src_data)]; - *dest_data = (quint32) PREMUL(pixel); + *dest_data = data->colortable[qMin(tableSize, *src_data)]; } } + data->colortable = QVector(); data->format = QImage::Format_ARGB32_Premultiplied; data->bytes_per_line = dst_bytes_per_line; data->depth = depth; @@ -2401,6 +2404,7 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio } } + data->colortable = QVector(); data->format = QImage::Format_RGB32; data->bytes_per_line = dst_bytes_per_line; data->depth = depth; @@ -2446,6 +2450,7 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers } } + data->colortable = QVector(); data->format = QImage::Format_RGB16; data->bytes_per_line = dst_bytes_per_line; data->depth = depth; -- cgit v0.12 From 04db5e3722c9f3e32f2a0a03962abc9456139883 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 22 Jul 2010 12:54:57 +0200 Subject: Avoid qMin() for each pixel when converting indexed colors in-place Instead of checking if the value is in boundary for each pixel, we can fill the color table with 256 value and convert the colors directly. This optimization is an idea of Kim Kalland. Reviewed-by: Kim Reviewed-by: Olivier Goffart --- src/gui/image/qimage.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index e8c01c7..dc70dcb 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2346,8 +2346,12 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve } else { for (int i = 0; i < data->colortable.size(); ++i) data->colortable[i] = PREMUL(data->colortable.at(i)); + + // Fill the rest of the table in case src_data > colortable.size() + const int oldSize = data->colortable.size(); + const QRgb lastColor = data->colortable.at(oldSize - 1); + data->colortable.insert(oldSize, 256 - oldSize, lastColor); } - const int tableSize = data->colortable.size() - 1; for (int i = 0; i < data->height; ++i) { src_data -= src_pad; @@ -2355,7 +2359,7 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve for (int pixI = 0; pixI < width; ++pixI) { --src_data; --dest_data; - *dest_data = data->colortable[qMin(tableSize, *src_data)]; + *dest_data = data->colortable.at(*src_data); } } @@ -2391,8 +2395,12 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio data->colortable.resize(256); for (int i = 0; i < 256; ++i) data->colortable[i] = qRgb(i, i, i); + } else { + // Fill the rest of the table in case src_data > colortable.size() + const int oldSize = data->colortable.size(); + const QRgb lastColor = data->colortable.at(oldSize - 1); + data->colortable.insert(oldSize, 256 - oldSize, lastColor); } - const int tableSize = data->colortable.size() - 1; for (int i = 0; i < data->height; ++i) { src_data -= src_pad; @@ -2400,7 +2408,7 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio for (int pixI = 0; pixI < width; ++pixI) { --src_data; --dest_data; - *dest_data = (quint32) data->colortable[qMin(tableSize, *src_data)]; + *dest_data = (quint32) data->colortable.at(*src_data); } } -- cgit v0.12 From c4bea746a3a94e8484b88a3a337e17591ce1d3c8 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 22 Jul 2010 13:53:54 +0200 Subject: Improve the conversion from indexted to RGB16 Instead of converting each color, we create a color table with the RGB16 colors. The conversion can be done for each pixel directly with the table. Reviewed-by: Kim Reviewed-by: Olivier Goffart --- src/gui/image/qimage.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index dc70dcb..713e765 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2440,12 +2440,23 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers const int width = data->width; const int src_pad = data->bytes_per_line - width; const int dest_pad = (dst_bytes_per_line >> 1) - width; - if (data->colortable.size() == 0) { - data->colortable.resize(256); + + quint16 colorTableRGB16[256]; + if (data->colortable.isEmpty()) { for (int i = 0; i < 256; ++i) - data->colortable[i] = qRgb(i, i, i); + colorTableRGB16[i] = qt_colorConvert(qRgb(i, i, i), 0); + } else { + // 1) convert the existing colors to RGB16 + const int tableSize = data->colortable.size(); + for (int i = 0; i < tableSize; ++i) + colorTableRGB16[i] = qt_colorConvert(data->colortable.at(i), 0); + data->colortable = QVector(); + + // 2) fill the rest of the table in case src_data > colortable.size() + const quint16 lastColor = colorTableRGB16[tableSize - 1]; + for (int i = tableSize; i < 256; ++i) + colorTableRGB16[i] = lastColor; } - const int tableSize = data->colortable.size() - 1; for (int i = 0; i < data->height; ++i) { src_data -= src_pad; @@ -2453,12 +2464,10 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers for (int pixI = 0; pixI < width; ++pixI) { --src_data; --dest_data; - const uint pixel = data->colortable[qMin(tableSize, *src_data)]; - *dest_data = qt_colorConvert(pixel, 0); + *dest_data = colorTableRGB16[*src_data]; } } - data->colortable = QVector(); data->format = QImage::Format_RGB16; data->bytes_per_line = dst_bytes_per_line; data->depth = depth; -- cgit v0.12