summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
* | Fix QT_NO_LIBRARYTasuku Suzuki2010-04-293-16/+16
| | | | | | | | | | | | | | | | | | Some class uses QFactoryLoader without checking if QT_NO_LIBRARY is not defined. Remove QT_NO_SETTINGS used with QT_NO_LIBRARY for QFactoryLoader because LIBRARY depends on SETTINGS. Merge-request: 578 Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
* | Added QIcon::name()Aurelien Gateau2010-04-205-1/+51
| | | | | | | | | | | | | | | | This only works with icons loaded with QIcon::fromTheme() for now. Merge-request: 2367 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Reviewed-by: jbache
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-04-165-8/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtGuiu.def tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
| * Symbol visibility fixes for RVCT4 on SymbianIain2010-04-155-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | RVCT 4 is far more strict with regards to symbol visiblity that RVCT 2.2, and will hide symbols unless all references have default visibility in the object files. Update the various places in Qt code where the symbol visibility was set incorrectly for DLL-based platforms (those that use __declspec(dllimport) and (dllexport). Note: QtWebkit and QtScript are fixed in different commits. Task-number: QTBUG-9903 Reviewed-by: Jason Barron
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-131-1/+1
|\ \ | |/
| * Fix segfault, if QPixmap::loadFromData() failsJohannes Zellner2010-04-121-1/+1
| | | | | | | | Reviewed-by: Harald Fernengel
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-122-0/+4
|\ \ | |/ | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/gui/image/qimage.cpp src/openvg/qwindowsurface_vgegl.cpp
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-04-091-1/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Enable preserved swap behavior when surface is created due to resize. Generate triggered signal even the action launches menu in Symbian. Symbian emulator: unload file server so apps can be recompiled. Clear QFontCache TLS content before nullifying TLS pointer. Fixed focus and window activation events on Symbian when opening menu. QTBUG-4887 and other exception safety fixes
| | * QTBUG-4887 and other exception safety fixesmread2010-04-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change includes a fix for QTBUG-4887 and other exception safety problems found while testing it. The QTBUG-4887 fix is to qimage.cpp. QImage doesn't throw exceptions on failure like a proper class should, instead it tries to fail "nice". What happens here is that setAlphaChannel would crash on OOM as after the convertToFormat call, d could be NULL. This new version checks the result of the conversion before using it. The other fixes are all cases where exceptions were thrown from destructors. I added code to the test app to help debug these cases, and I fixed all the problems I found. With these changes, tst_exceptionsafety_objects runs and passes on the Symbian emulator. Reviewed-by: Shane Kearns
| * | Fix <MemLeak> valgrind report shows memory leak for QImage::save().Stefano Pironato2010-04-071-0/+1
| |/ | | | | | | Reviewed-by: Marius Storm-Olsen
* | Prevented unnecessary copy in QImage::setAlphaChannel().Samuel Rødal2010-04-061-3/+4
| | | | | | | | | | | | | | | | | | If the formats don't match the detch is unnecessary as operator= will anyways destroy the detached QImageData and substitute it with the newly created QImageData from convertToFormat. Task-number: QTBUG-9640 Reviewed-by: Trond
* | Included ARM NEON optimizations from pixman in Qt.Samuel Rødal2010-03-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the N900 16 bit text blending is 30 - 50 % faster, and ARGB32PM on RGB16 image blending now runs in 1/10th of the time it used to. We now make ARGB32PM the default pixmap format for alpha pixmaps instead of ARGB8565PM which is unaligned and bad for performance. The relevant numbers: Mostly opaque pixels: ARGB24 on ARGB24 using QPainter..................: 336,813033 ARGB32 on ARGB32 using QPainter.................: 18,419387 RGB16 on ARGB24 using QPainter..................: 167,301014 RGB16 on ARGB32 using QPainter..................: 17,279372 ARGB24 on RGB16 using QPainter..................: 35,100147 ARGB32PM on RGB16 using QPainter................: 15,924256 No opaque pixels: ARGB24 on ARGB24 using QPainter..................: 412,190765 ARGB32 on ARGB32 using QPainter.................: 16,818389 RGB16 on ARGB24 using QPainter..................: 170,957878 RGB16 on ARGB32 using QPainter..................: 16,742984 ARGB24 on RGB16 using QPainter..................: 93,600482 ARGB32PM on RGB16 using QPainter................: 15,999310 So switching to ARGB32PM should give a boost in all areas. Task-number: QTBUG-6684 Reviewed-by: Gunnar Sletta
* | Safeguard the colortable access when converting corrupted indexed8Gunnar Sletta2010-03-261-2/+2
| | | | | | | | | | Fixes: QTBUG-5510 Reviewed-by: Eskil
* | Fixed QPrintPreview text drawing (visible in Assistant).Trond Kjernåsen2010-03-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | WebKit (which Assistant uses) uses QFont::setPixelSize() to specify the font sizes. Those are treated differently in Qt than fonts specified with setPointSize(). Fonts specified with setPixelSize() should *not* be scaled to compensate for DPI changes between devices, unlike fonts with a pointSize() set. Task-number: QTBUG-9282 Reviewed-by: Eskil
* | Let QImageReader open the device if it is not open alreadyaavit2010-03-191-1/+1
| | | | | | | | | | | | This brings the actual behaviour in line with the doc of setDevice(). Reviewed-by: Trond
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-171-2/+2
|\ \ | |/ | | | | | | | | Conflicts: src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def
| * Fix fromSymbian*() image conversion functions.Jason Barron2010-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | Do not explicitly create instances of QS60PixmapData in this function because it is possible that we are using another graphics system. The fromNativeType() function is virtual so the graphics system will create the right version of the pixmap data for us and ensure that we get into the right implementation. Reviewed-by: Aleksandar Sasha Babic
* | Handle EGLSurfaces better, including more error detectionTom Cooksey2010-03-101-1/+1
| | | | | | | | | | | | | | Note: This changes QX11PixmapData::gl_surface to a void* to enable build on 64-bit systems where EGLSurface is a pointer. Reviewed-By: TrustMe
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-066-25/+53
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts