summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | More Pixmap cache key optimizationsJens Bache-Wiig2010-06-021-8/+8
| | | | | | | | Reviewed-by: ogoffart
* | Some optimizations for QImage::load()Jens Bache-Wiig2010-06-011-2/+9
| | | | | | | | | | | | | | | | | | | | We didnt check if the file existed before trying to load it. This means that we had a lot of redundant dlopen calls for that case. In addition pixmap cache should be significantly faster now. Task-number: QTBUG-11137 Reviewed-by: joao
* | Merge commit 'origin/4.7' into symbian47Thomas Zander2010-05-272-4/+4
|\ \ | | | | | | | | | | | | Conflicts: src/plugins/bearer/symbian/qnetworksession_impl.h
| * \ Merge remote branch 'origin/4.7' into oslo-staging-1Aaron McCarthy2010-05-241-1/+2
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/gui/styles/qmacstyle_mac.mm
| * | | doc: Fixed many broken links.Martin Smith2010-05-202-4/+4
| | | |
* | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-05-224-18/+34
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Enable QTouchEvent for S60 5.0 Add missing license header. Fix build error on S60 3.1 environments QRuntimeGraphicsSystem Fix replacement functions in platform_paths.prf
| * | | Merge branch '4.7' of scm.dev.troll.no:qt/qt-s60-public into 4.7Jani Hautakangas2010-05-204-16/+64
| |\ \ \ | | |/ /
| * | | QRuntimeGraphicsSystemJani Hautakangas2010-05-204-18/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRuntimeGraphicsSystem is a proxy graphics system which can dynamically switch underlying graphics system on runtime. For example, switch from hardware accelerated graphics system to raster graphics system on low GPU memory situation. This feature is currently supported on Symbian platform. Task-number: QT-3276 Reviewed-by: Jason Barron
* | | | Compile with gcc 4.0.1Olivier Goffart2010-05-201-1/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | qstylehelper_p.h now includes qstringbuilder.h This triggers a gcc 4.0.1 bug when doing addition or % on annonymous enum - include qstylehelper_p.h last to avoid errors in 3rd party header - explicitly cast enums to int in qwindowsstyle.cpp Reviewed-by: Thierry
* | | Optimized pixmapcache key generation for icons and stylesOlivier Goffart2010-05-171-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | This re-apply commit c8d2e18c4b431870560f324a17f20904bb47ae68 from Jens that was reverted in b0f4dab4 because it did not compile. Added the missing include to make it compile on mac Task-number: QTBUG-9850
* | | Ensure QPixmapCache does not flush pixmaps that are still in use.Warwick Allison2010-05-113-2/+53
|/ / | | | | | | | | Task-number: QTBUG-10576 Reviewed-by: Alexis Menard