summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* QPixmaps try to access FBS connection after the connection has been closed.Jani Hautakangas2010-09-062-2/+53
| | | | | | | | This patch fixed the issue by tracking pixmaps and destroying native bitmaps before FBS connection is closed. Task-number: QTBUG-9112 Reviewed-by: Jason Barron
* Revised fix for pixmap loadingJens Bache-Wiig2010-08-201-0/+5
| | | | | | | | | | | | Change 2c8f9dee611 had an unwelcome side-effect and was reverted. Since we do have the undocumented behavior that we scan for all possible extensions when QPixmap is provided with a filename without extensions we could not simply exit if the file did not exist. We now check if there are extensions before doing so. Reviewed-by: gabi Task-number: QTBUG-11137
* Fixes a regression preventing loading images without extensionsThierry Bastian2010-08-191-3/+0
| | | | | Task-number: QTBUG-12560 Reviewed-by: gabi
* Use the fast Neon conversion for converting colors of jpeg images.Benjamin Poulain2010-08-061-2/+9
| | | | Reviewed-by: Andreas Kling
* Do the conversion from RGB888 to RGB32 using NeonBenjamin Poulain2010-08-063-0/+123
| | | | | | | | Doing the conversion with Neon is 700% faster. Help by Thiago Macieira on vacation. Reviewed-by: Thiago Macieira
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-042-8/+26
|\ | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Add the qt_ prefix to convert_rgb888_to_rgb32_ssse3 Update changes-4.7.0 Use the fast conversion from RGB888 to RGB32 for Jpeg images Move the SIMD defines to the common declaration of Qt symbols Fixed: QT_DEPRECATED_WARNINGS defines QT3_SUPPORT
| * Add the qt_ prefix to convert_rgb888_to_rgb32_ssse3Benjamin Poulain2010-08-032-4/+4
| | | | | | | | | | | | | | Exported function needs to have the qt_ prefix. Beviewed-by: Olivier Goffart Reviewed-by: Andreas Kling
| * Use the fast conversion from RGB888 to RGB32 for Jpeg imagesBenjamin Poulain2010-08-032-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | The commit 90642dd2b6b14c39cc6178f1161331895809b342 introduce a fast way to convert from RGB888 to RGB32 with SSSE3. This patch uses that function to do the color conversion when decoding jpeg images. The #defines for the SIMD extension have been moved to the common code in order to be able to compile the jpeg handler directly in QtGui or as a plugin. Reviewed-by: Andreas Kling
* | Unbreak QImage::rgbSwapped() for many image formats.Andreas Kling2010-08-031-41/+35
|/ | | | | | | These formats had broken rgbSwapped() implementations: argb8565, argb6666, rgb555, argb8555, rgb444, argb4444 Reviewed-by: Benjamin Poulain
* Fix compilation with QT_NO_TEXTCODECTasuku Suzuki2010-07-291-1/+1
| | | | | Merge-request: 755 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Use SSSE3 to convert from RGB888 to RGB32Benjamin Poulain2010-07-263-1/+160
| | | | | | | | | | | | | | | Converting from RGB encoded on 24bits to RGB encoded on 32 bits is quite inefficient. This type of conversion is common for some image format. The patch implement the conversion with SSSE3. This reduce by 3 the number of instructions, pushing the bottleneck to memory bandwidth. On Atom N450, the new benchmark is 40% faster for scanlines of 2000 pixels, 30% faster for scanlines of 32 pixels, and 15% slower for small images (3 and 8px). Reviewed-by: Olivier Goffart
* Improve the conversion from indexted to RGB16Benjamin Poulain2010-07-221-7/+16
| | | | | | | | | 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
* Avoid qMin() for each pixel when converting indexed colors in-placeBenjamin Poulain2010-07-221-4/+12
| | | | | | | | | | 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
* Premultiply the color table instead of each pixel for image conversionBenjamin Poulain2010-07-221-2/+7
| | | | | | | | 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
* Fixed a QSplashScreen hanging bug in S60 3.1 devices.axis2010-07-201-6/+14
| | | | | | | | | | | | | | | | | | QSymbianBitmapDataAccess is used to provide access to the bitmap heap in a manner that locks correctly on all platform versions. The heapWasLocked variable was meant to protect against the case where the heap is locked recursively. However, it failed to take into account the case where the same QSymbianBitmapDataAccess object was used to lock recursively. In this case the variable would be changed to true on the second lock, which means that the lock would never be released again. This was fixed by making the access reference counted instead. Since the bitmap heap lock is global, the refcount was made global as well. Task: QTBUG-11129 RevBy: Jason Barron AutoTest: Works again. It was hanging before this fix.
* The forward declaration should have been in the namespace for QImageDataBenjamin Poulain2010-07-081-2/+2
| | | | Reviewed-by: Olivier Goffart
* Add test and fix style for the SSE2 implementation of ARGB32 conversionBenjamin Poulain2010-07-072-3/+3
| | | | | | | | The commit beba018814b35c4bd032e6b9fa948e4bac34c59a introduce conversion from ARGB32 to ARGB32_PM with SSE2. This patch add a benchmark for this type of usage, and change the name to use lowercase for SSE2 (style convention).
* Build fix, the header of QImageData did not declare QImageWriter.Benjamin Poulain2010-07-071-0/+2
| | | | | Including this header in the SSE2 file broke the build because QImageWriter was not declared.
* SSE2 implementation of convert_ARGB_to_ARGB_PM_inplace for QImageJohn Brooks2010-07-074-2/+130
| | | | | Merge-request: 725 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Revert "Character spacing when drawing a QPicture to a high DPI device."Trond Kjernåsen2010-07-051-13/+39
| | | | | | This reverts commit d0fb8557f3fc3e7c9305662d118228ceca9df72b. This change breaks justified text drawing in QPrintPreview, so it's reverted for now.
* make image handler includes privateOswald Buddenhagen2010-07-0414-28/+28
| | | | | now that they live in gui/image/ instead of plugins/imageformats/, the handlers need to get the usual _p suffix.
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-0316-46/+3763
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Consolidate zlib configuration redundancy Fixed whitespace formatting Fix incomplete support for built-in jpeg, mng, tiff and gif handlers Split image handler plugin project files No explicit link to zlib/jpeg for system mng/tiff Removed stray line continuations Long live else! qdoc: Added a solution for creating tables of contents for manuals. Doc: Fixed markup. Fixed size hint for combo box on windows
| * Fix incomplete support for built-in jpeg, mng, tiff and gif handlersMark Brand2010-07-022-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, although the configure shell script could configure built-in support for these image formats, the .pr[io] files would nevertheless build them as plugins. Support was also missing from qimagereader and qimagewriter. This has now been added. Configure.exe, while clearly intended to support this too, needed a few minor fixes. For example, the usage of values "qt" and "yes" was inconsistent. For both configure tools, the explanation of the *non*-related options has been clarified, i.e: -no-libjpeg -qt-libjpeg -system-libjpeg These options have nothing to do with the plugin/built-in distinction. There are (still) no configure options for specifying "plugin" or "built-in" for these image formats. Quite reasonably, "plugin" is selected for shared Qt and "built-in" is selected for static Qt. Merge-request: 715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * Split image handler plugin project filesMark Brand2010-07-0214-38/+3641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One pri for each handler, e.g. src/gui/image/qjpeghandler.pri. One pri for each 3rd party package, e.g src/3rdparty/libjpeg.pri. One shared pri for zlib dependency of 3rd party packages. This was really about image handler plugins, but PNG got the same treatment for consistency's sake. Also, moved image handler source files from plugins to src/gui/image so they are with the other image handlers. Merge-request: 715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * Removed stray line continuationsMark Brand2010-07-021-4/+2
| | | | | | | | | | Merge-request: 715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * Long live else!Mark Brand2010-07-021-4/+4
| | | | | | | | | | Merge-request: 715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7mread2010-07-029-64/+232
|\ \ | |/ | | | | | | | | Conflicts fixed: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-07-019-64/+232
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (39 commits) Use built-in iconv on Solaris if available Export various symbols needed to make a custom GL graphicssystem. Moc: fix compilation when templated types with multiple arguments are used. Fixes the documentation of QGraphicsEffect::update(). support BGRA textures on SGX Avoid calling time.elapsed() twice in abstract animation Adds slowdownFactor to UnifiedTimer in abstract animation Add the conversion in-place for QPixmap::fromImageReader() on raster. Add QPixmap::fromImageReader() to decode arbitrary images in place. Add missing license header. Added textureUpload benchmark to the GL benchmarks Fixed a crash in menubar with invisible actions Fixed ARM .def files. Doc: QSettings::sync() imports changes made by other processes. Made -graphicssystem trace work with Qt::TextBypassShaping flag. Fix an assertion in comp_func_SourceOver_sse2() if const_alpha == 0 Add a manual test for regular widget interaction with the table. New variant of ::createPixmapData with origin for QGraphicsSystem. EGL plane levels are the same as all other GL backends. Need to access extensionFuncs in subclasses too. ...
| | * Add the conversion in-place for QPixmap::fromImageReader() on raster.Benjamin Poulain2010-06-302-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Since raster uses QImage internal, QPixmap::fromImageReader() can use conversion in-place of the image. This avoid a memory peak during the conversion and is a bit faster. Reviewed-by: Samuel Rødal
| | * Add QPixmap::fromImageReader() to decode arbitrary images in place.Benjamin Poulain2010-06-304-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoding in-place with QPixmap::fromData() has limitations, it cannot be used with animated gif images, and the user has no control over the parameters of the image reader. Reader the image directly from the image reader allow us to do a better job when loading images. Reviewed-by: Simon Hausmann Reviewed-by: Samuel Rødal
| | * Fixed some potential index-out-of-bounds issues in QImage.Kim Motoyoshi Kalland2010-06-241-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added color table bounds checks when converting a color indexed image to a different pixel format. Fixed an off-by-one error in the color table bounds check in QImage::setPixel(). Fixed an autotest that was setting pixel values out of bounds. Reviewed-by: Gunnar
| | * Fixed missing copy of raster pixmap data after change fb76a872e20bd.Samuel Rødal2010-06-232-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | It's expected that copy actually does a deep copy of the image data. Because QRasterPixmapData::fromImage() will just use the source image as is in this case we need to do a deep copy of the QImage. Reviewed-by: Trond
| | * Fixed QPixmap::toImage() bug introduced in fb76a872e20bd.Samuel Rødal2010-06-231-0/+10
| | | | | | | | | | | | | | | | | | | | | The alpha channel we get from XGetImage might not be saturated for opaque pixmaps. Reviewed-by: Trond
| | * Optimized sub-rect copying / painting of QPixmaps.Samuel Rødal2010-06-236-59/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prevented downloading of the whole XImage by introducing new QPixmapData::toImage() overload taking a sub-rect. Also avoid an additional copy by simply taking ownership of the XImage data when the XImage format matches the QImage format. Reviewed-by: Trond
* | | Avkon removal configured with -no-s60mread2010-07-011-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avkon dependencies can be configured out with the -no-s60 configure flag, conversely Qt on Symbian will use Avkon if -s60 is configured. These changes are intended to keep or introduce binary compatibility between the s60 and no-s60 configurations. To do this, it has been necessary to introduce stub equivalents of the CAknAppUi related classes into the no-s60 configuration, and override all Avkon framework virtual functions in the QS60Main... classes. Other than that, these changes are mostly just correcting the use of the Q_WS_S60 flag so that it only refers to Avkon dependencies. Reviewed-by: Sami Merila
* | Reformat whitespace according to coding styleMark Brand2010-06-302-3/+3
|/ | | | | | | | Mostly indentation affected, but also standardized spaces adjacent to () in configureapp.cpp. Merge-request: 715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Start the implementation of in-place recoding for imagesBenjamin Poulain2010-06-204-95/+399
| | | | | | | | | | | | | | | | | | | | | Currently, with the graphics system raster, converting from images to QPixmap often needs to allocate a new image to convert the right format. For example, for an image in ARGB32 of 10 mbytes, we need to allocate a second image of 10 mbytes in ARGB32_PM to convert the source image in the right format for pixmap. This can create a hight peak of memory, and is a bit slower than it should. This patch introduce in-place conversion of images when they are loaded with QPixmap::loadFromData(). The images are loaded in their default format by QImageReader, and are then converted in-place, trying to reduce memory allocations. Reviewed-by: Samuel Rødal
* Don't do opaque detection when copying a sub-rect of a QPixmap.Samuel Rødal2010-06-171-1/+1
| | | | | | | | If the pixmap is non-opaque in the first place most likely a reasonably sized sub-rect is also non-opaque, so this check is a waste in 90 % of the cases. Reviewed-by: Gunnar Sletta
* Optimized QPixmap::fromImage for raster pixmaps.Samuel Rødal2010-06-171-3/+16
| | | | | | | | If we know that the QImage is ARGB32 or ARGB32_Premultiplied and doesn't contain any alpha pixels we can treat it as RGB32 when doing the conversion. Reviewed-by: Gunnar Sletta
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-06-163-7/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (62 commits) Use native locale aware string comparison on Symbian. Temporary fix for regression in QSslCertificate::fromPath() doc: Added more DITA output to the XML generator Fix symbian building of TARGET with a slash Fix a minor typo in QAbstractItemModel's documentation. QXmlSchema: allow usage of xsd:all QSslSocket: fix build for MinGW and VS 2005 Fix symbian-abld build failure with bearer plugins remove certificate bundle make QSslSocket::systemCaCertificates() use system certs Adjusted RegExp in QSslCertificate::fromPath() Fix QSystemTrayIcon::supportsMessages() on Windows Use NIM_SETVERSION to get the latest behavior Cleanup obsolete stuff doc: Added DITA XML generator Fixed a broken merge. Changed the way we detect touch screen on Windows. Fixed error deploying qsymbianbearer.qtplugin on Symbian. Revert "Attempt to fix build failure on Symbian." Attempt to fix build failure on Symbian. ...
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-06-153-7/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (58 commits) Fix a minor typo in QAbstractItemModel's documentation. QXmlSchema: allow usage of xsd:all QSslSocket: fix build for MinGW and VS 2005 Fix symbian-abld build failure with bearer plugins remove certificate bundle make QSslSocket::systemCaCertificates() use system certs Adjusted RegExp in QSslCertificate::fromPath() Fix QSystemTrayIcon::supportsMessages() on Windows Use NIM_SETVERSION to get the latest behavior Cleanup obsolete stuff doc: Added DITA XML generator Fixed a broken merge. Changed the way we detect touch screen on Windows. Fixed error deploying qsymbianbearer.qtplugin on Symbian. Revert "Attempt to fix build failure on Symbian." Attempt to fix build failure on Symbian. Replaced redundant "!contains" scopes in "contains(A, B) {...} !contains(A, B) {...}" constructions with "else" Updated leading whitespace to make indentation more consistent Updated project files so it is now possible to use "-system-zlib" configuration option on Windows and Symbian platforms. make postgresql support sensitive to PSQL_LIBS ...
| | * Updated project files so it is now possible to use "-system-zlib" ↵Constantin Makshin2010-06-101-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | configuration option on Windows and Symbian platforms. Improved support of "-system-jpeg" "-system-mng" "-system-png" and "-system-tiff" configuration options on Windows (thanks to Mark Brand <mabrand@mabrand.nl>) Merge-request: 2411 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-06-082-4/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (29 commits) I10n: Update German translations for 4.7.0 Fix a freetype link failure. Fix configure test for DirectFB Split Symbian bearer plugin into three platform specfic plugins Doc: Fixed whitespace in the other configuration file for zh_CN. Doc: Fixed whitespace in the Simplified Chinese doc configuration. Unbreak Linux build when qendian.h is included before qglobal.h Revert accidental commit of irrelevant stuff. Silly mondays.. Unbreak Linux build when qendian.h is included before qglobal.h Fix QApplication/QWidget to really take ownership of input contexts Added setting a hotspot on standard gestures Fixed GestureOverride event delivery in GraphicsView. add check-ts target to auto-asses translation completeness qt_ja_JP.ts => qt_ja.ts Fix incorrect \since tag XQuery test suite (and others): remove p4 dependency add docu about pixmaps being invalidated on qapp destruction remove somewhat misleading warning about x11 pixmap leak Disabled item view items use incorrect background color Update the mkspec for linux-icc: don't use jump tables in shlibs ...
| | | * add docu about pixmaps being invalidated on qapp destructionOswald Buddenhagen2010-06-071-0/+3
| | | | | | | | | | | | | | | | Reviewed-by: jbache
| | | * remove somewhat misleading warning about x11 pixmap leakOswald Buddenhagen2010-06-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the only situation where it would be actually true are broken drivers (or a broken x server as a whole). qt is not the right place to worry about that problem. Reviewed-by: jbache
* | | | Fixed QImageReader::format() inconsistency.Samuel Rødal2010-06-155-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If state is set to ReadHeader before canRead() then setFormat("png") never gets called. We should make sure that setFormat() gets set whenever canRead() returns true. Task-number: QTBUG-2263 Reviewed-by: Kent Hansen
* | | | Added missing sanity checks in qimage.cppSamuel Rødal2010-06-151-0/+13
|/ / / | | | | | | | | | | | | | | | | | | | | | We should be consistent and do sanity checks whenever we allocate new images. Task-number: QTBUG-1985 Reviewed-by: Eskil
* | | Do not keep flush timer running once no pixmaps are detached.Warwick Allison2010-06-111-11/+18
|/ / | | | | | | Task-number: QT-3500
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-06-081-0/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp src/3rdparty/webkit/WebKit/qt/ChangeLog src/gui/painting/qpainter.cpp src/gui/painting/qtextureglyphcache.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtNetworku.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qfontmetrics/tst_qfontmetrics.cpp tools/linguist/lupdate/main.cpp
| * Fixed alpha check for mono images.Kim Motoyoshi Kalland2010-06-011-0/+2
| | | | | | | | | | Task-number: QTBUG-9072 Reviewed-by: Trond