summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Inline and mark as deprecated images's serialNumber()Olivier Goffart2012-02-265-20/+10
| | | | | | | | | | | | These function are marked as obsolete since Qt 4.3 The motivation here was too fix QPixmap::serialNumber which is marked as QT_DEPRECATED_SINCE but was not inlined. But then I took the oportunity to do the same with all the other functions. Change-Id: Ic50a7857461fc402b2f2b4528c83e53e8e28ea30 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.Friedemann Kleint2012-02-203-0/+3
| | | | | | | Forward-declare instead. Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove dead method.Richard Moore2012-02-202-9/+0
| | | | | | | Fix Qt 5 TODO Change-Id: I9a12cc07ebc7c039bbeb53922b0539f177b226f8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Redirect libjpeg messages via qWarningDonald Carr2012-02-161-0/+9
| | | | | | | | | | This allows us to catch spurious libjpeg warnings via the installation of a message handler Change-Id: I82f3257118b5fbdf66550be80e72f75e9a24d3c1 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add qt_pixmapFromWinHICON again for Windows CE.Andreas Holzammer2012-02-101-0/+179
| | | | | | | | | | qt_pixmapFromWinHICON is used by qfileiconprovider and qwindowsstyle. So use this one from Qt 4.8. Also put functions of qguifunctions_wince in here, because this was splitted. Change-Id: I00ffb9d66a84884f7338648982e516ca016b9bd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Introduce QScreen::grabWindow(), deprecate QPixmap::grabWindow().Friedemann Kleint2012-02-093-54/+13
| | | | | | | WId can be local to a screen. Change-Id: I09ca71313836a34dbf33289b254c80207a956bb1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Removed image format specific template functions in raster engine.Kim Motoyoshi Kalland2012-02-073-382/+197
| | | | | | | | Simplified the raster engine by treating image formats in a more generic way and removed some unused code. Change-Id: Ib3979a1a6e3e6f17c5002248545779ec36fff7c9 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* pixmap: Add QPlatformPixmap::fromData null check for the imageHolger Hans Peter Freyther2012-02-021-0/+2
| | | | | | | | | | QPlatformPixmap::fromFile is doing the null check, QRasterPlatformPixmap::fromData is doing the null check as well. Add the null check to QPlatformPixmap::fromData as well. This would have avoided a crash in the directfb plugin. Change-Id: Ifc904b2df2424e86bf0992d4e28dc256530be02d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use QBasicMutex instead of Q_GLOBAL_STATIC QMutexOlivier Goffart2012-02-011-10/+6
| | | | | | | | | | | | | | QBasicMutex is a POD and can be used as a static global object. in qpicture.cpp factoryLoader is used only once, and under the mutex, so there is no need for Q_GLOBAL_STATIC for it, it can be a function static in qhostinfo_unix.cpp the code seemed wrong while compiled with namespace and QT_NO_GETADDRINFO. I also could get rid of one include because it was included earlier. Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-1/+1
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Add support for cleanup functions for data-constructed QImagesSimon Hausmann2012-01-313-23/+59
| | | | | | | | | | | | | | | | A QImage can be constructed with a provided buffer, that has to be kept alive for the live-time of the QImage and all its copies. Frameworks like CoreGraphics or Cairo offer a similar method of creating image objects and also offer the ability to provide a callback function that is called when the image is destroyed. This patch adds this functionality to QImage by extending the QImage constructors that take a raw image buffer pointer. Change-Id: Ia6342408c560ef49b498c9e4664b4602febb0fcd Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove many deprecated methodsLars Knoll2012-01-312-7/+8
| | | | | | | | | | Remove methods that have been marked as deprecated before Qt 4.6. Keep others, but inline them where possible and mark them as QT_DEPRECATED_SINCE(5, 0). Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Moving tiff image format support and libtiff out of qtbaseaavit2012-01-317-795/+4
| | | | | | | | | | The tiff plugin and bundled libtiff is moving to the qtimageformats project on Gerrit. Task-number: QTBUG-23887 Change-Id: I4c848232fdccddd7e7f54215f9eaa78dc4c3a53d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3060-60/+60
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2511-11/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove support for the MNG file format and the bundled libmngaavit2012-01-256-621/+0
| | | | | | | | | | | | | The MNG file format is generally abandoned, and libmng has been unmaintained for several years. The MNG plugin and bundled libmng has been moved to the qtimageformats project on Gerrit. Task-number: QTBUG-21869 Change-Id: I946432347014ffde2b72307a5f8b166ca5553602 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove Symbian specific code from QtGui.Xizhi Zhu2012-01-243-488/+2
| | | | | Change-Id: I103abb545d1a5deed7d40c0b50fc3eff0c89d622 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2363-63/+63
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Rename all our interfaces from com.trolltech to org.qt-projectLars Knoll2012-01-192-2/+2
| | | | | | Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-101-1/+1
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Implement QDebug stream operators for builtin classesJędrzej Nowacki2012-01-104-0/+25
| | | | | | | | | | | QDebug stream operator was added for: QPixmap, QImage, QUuid, QBitArray, QLocale, QRegExp, QCursor, QPalette, QTextFormat, QTextLength, QIcon and QSizePolicy Change-Id: Ibcf5c9b599ba322d53cb106d8e5e157427ebe757 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-061-9/+9
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0562-62/+62
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* blitter: Base QBlitterPaintEngine on QRasterPaintEngineHolger Hans Peter Freyther2012-01-021-0/+32
| | | | | | | | | | | | | | The original intention was to identify a clipping bug, it turns out that during a ::begin() (and systemChanged) we should forward the QPaintEnginePrivate state to our proxy engine. Instead of using the proxy-pattern subclass rasterengine and specialize the paths we are able to accelerate using the blitter interface. This will avoid similiar problems in the future. I have no performance measurement to show which of the two approaches is faster/slower. Change-Id: I39bff11b32b1fe20284c7e8df60050de5991bb6e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove unused QPicture::detach_helper() private method.Robin Burchell2011-12-202-12/+0
| | | | | | | QPicture doesn't need this for quite a long time now, so get rid of it. Change-Id: Ie575f32555deb130f7b27e11a7617fb2b3dc4e43 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Remove non-const QMovie::cacheMode().Robin Burchell2011-12-202-11/+0
| | | | | | | There's a const QMovie::cacheMode(), so having this makes no sense. Change-Id: I0b6f20055fcbb28f3a21a8bc303f82543592c9c6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Remove qt_image_id() and qt_image_colortable().Robin Burchell2011-12-202-13/+0
| | | | | | | | Both of these have been unused at least as far back as Qt 4.5 according to git log -p. Change-Id: I381024cb1621fbfdb806a62e1cc55ce13219ef17 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make headers safe with QT_NO_CAST_FROM_BYTEARRAY.Stephen Kelly2011-12-091-2/+2
| | | | | Change-Id: I0f9dfee505ebc48d9c586c010ad75877a7387836 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* qpixmap_win.cpp: Fix typo in format conversion (alpha).Friedemann Kleint2011-12-051-2/+2
| | | | | Change-Id: I8abdae5482e94a7f9af494e5d547352431285336 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QtGui: Bring back HBITMAP/HICON conversion functions.Friedemann Kleint2011-11-282-0/+320
| | | | | | | | | | - Move the conversion functions from the Lighthouse plugin to QtGui as qt_pixmap/From/To/HBITMAP/HICON(). - Re-enable them in Widgets (QFileIconProvider, QWindowsStyle). - Use them in QtPrintSupport. Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improve QtGui start-up time and memory use.Samuel Rødal2011-11-041-4/+8
| | | | | | | | The gamma lookup tables can be allocated and computed on demand, as they're not always needed, depending on the platform and the use case. Change-Id: I2d4c2860746366a0e46edb53bd4ecd2778de2464 Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Remove declaration of QRasterPlatformPixmap::fromFile()Bradley T. Hughes2011-10-311-1/+0
| | | | | | | | | | | | | | | | | | | | | This function is not implemented, and the declaration hides the virtual QPlatformPixtmap::fromFile(): ../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/image/qpixmap_raster_p.h:70:10: warning: 'QRasterPlatformPixmap::fromFile' hides overloaded virtual function [-Woverloaded-virtual] void fromFile(const QString &filename, Qt::ImageConversionFlags flags); ^ ../../include/QtGui/../../src/gui/image/qplatformpixmap_qpa.h:90:18: note: hidden overloaded virtual function 'QPlatformPixmap::fromFile' declared here virtual bool fromFile(const QString &filename, const char *format, ^ Change-Id: Iedbc4acd9f9218f8fe72a44a9eff6a35b5494d75 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add missing include when enabling deprecated codeOlivier Goffart2011-10-311-0/+4
| | | | | | | | QStringList is used by the inline code. (I did not see that before because I was using precompiled headers) Change-Id: Ieea4f13c143495f841b5246d835b584cc7404ac6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Gui/OpenGL: Remove remains of qpa from profiles.Friedemann Kleint2011-10-311-18/+1
| | | | | Change-Id: Iff2531a19030bd782ee4cd9bbe529d18666503f9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove Windows and X11 from src/widgets/platforms.Robin Burchell2011-10-281-1/+0
| | | | | | | | | | This is dead code, unused with QPA in place, so remove it to avoid confusion caused through grepping for class names existing in both old and new places. Mac code is left in place for now, as some of it is still in use. Change-Id: Ia82cd5bbabe71285ca997f79d8fd9c0504e32c28 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-273-10/+10
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Compile with QT_ENABLE_DEPRECATED_BEFORE set to old version of QtOlivier Goffart2011-10-272-13/+12
| | | | | Change-Id: Ice67071cc97ad645a7dda264a3dce184fceae75a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtGui: Remove Q_WS and qpa.Friedemann Kleint2011-10-251-3/+3
| | | | | | | | | Enable compilation without -qpa. Remove QT_NO_FREETYPE and QT_NO_FONTCONFIG when building. Change-Id: I0e017cc47ee06b885be65deaeb67a449a119b8be Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* [blitter] Work on tst_QPixmap::clear()Holger Hans Peter Freyther2011-10-212-3/+15
| | | | | | | | | | | | | | | | | | | By default QPixmap may not hasAlphaChannel(), only if setMask() or fill() with a transparent color is called a QPixmap will hasAlphaChannel(). Make the QBlittablePlatformPixmap remember if there is an alpha channel, pass this as parameter in createBlittable to make it clear that this is required and not optional. Update the DirectFB plugin to handle this parameter to create a RGB32 or ARGB Surface depending on the alpha value, also only use PreMultiplied alpha when using ARGB. Separate the two constructors for the QDirectFbBlitter to either adopt a DirectFB Surface or to create one. Change-Id: I8abf82408ecd2d075fc6f241ace8be2a34ac56e7 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [blitter] Generate a new serial number when resizing the pixmapHolger Hans Peter Freyther2011-10-211-0/+1
| | | | | | | | The raster pixmap is generating a new serial number when the pixmap is resized, do the same for the blitter code. Change-Id: I05c74df7ea0f3a99ec9c24dacb41562da21c2d6d Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove stale documentation.Casper van Donderen2011-10-182-263/+0
| | | | | Change-Id: I85139e0334b648bee0d18129cef9387dcc6c3222 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.Friedemann Kleint2011-10-1313-298/+0
| | | | | | Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove stale documentation and fix qdoc errors.Casper van Donderen2011-10-113-311/+0
| | | | | | | Change-Id: I51bb0c52eb32d9d672d115f31b16d414f81708e2 Reviewed-on: http://codereview.qt-project.org/6433 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix ́́`macros' function test of `tst_headers'Sergio Ahumada2011-10-031-0/+6
| | | | | | | | Task-number: QTQAINFRA-324 Change-Id: I3202d9ee42de8174c5170f1b853884b19d5895e3 Reviewed-on: http://codereview.qt-project.org/5925 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qpixmap: Use the primaryScreen for QPixmap::defaultDepthHolger Hans Peter Freyther2011-10-031-4/+3
| | | | | | | | | | | | | | Currently tst_QPixmap::testMetrics can fail if the native display resolution is below 32 bpp. Upate the documentation, use the primary screen to find the depth. Tested-on: XCB and directFB plugin. Change-Id: I29c08db25d8f6bcee01f9315ed90685fef668e0c Merge-request: 61 Reviewed-on: http://codereview.qt-project.org/5917 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-281-0/+4
| | | | | | | Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216 Reviewed-on: http://codereview.qt-project.org/5460 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* [blitter] Use QScopedPointer for the engine and blittableHolger Hans Peter Freyther2011-09-202-15/+10
| | | | | | | | | | | Use the QScopedPointer to prevent memory leaks, right now the code appears to be sound but make it more clear that calling ::setBlittable will destroy the old one. Change-Id: Idc71add7cfd429ff5b9d0ea9908d9fff1e7ce74d Merge-request: 59 Reviewed-on: http://codereview.qt-project.org/5243 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Avoid double caching glyphs in raster/QPA/FreeTypeEskil Abrahamsen Blomfeldt2011-09-202-3/+9
| | | | | | | | | | | | | | | | | | | | | Since FreeType has internal caching, it has had a special code path in the raster engine which avoided using Qt's glyph cache, as that would be redundant. However, when compiling with QPA, we want the same behavior without being able to access the QFontEngineFT class. To achieve this, I've made a new abstraction and added it to QFontEngine which allows the FT engine to provide direct pointers into the alpha maps stored by FT. This requires a locking/unlocking mechanism. Yes, the QFontEngine::alphaMap* API is slowly becoming a horrible mess, but due to time constraints, the task of refactoring these functions into a more flexible API needs to wait. I've added a TODO comment for this. Change-Id: I08237403c2967f8fb952258178676f33a87c0353 Reviewed-on: http://codereview.qt-project.org/5155 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clang build fix: QPixmap::init -> QPixmap::doInitJani Uusi-Rantala2011-09-072-12/+12
| | | | | | | | | | | | QPixmap::init shadows base class QPaintDevice::init with different declaration which makes latest clang builds fail on modules. Simple renaming of this private function fixes the issue. Change-Id: I65b2b09e81f4833dc9b54b36423ba7c15d9ded4f Reviewed-on: http://codereview.qt.nokia.com/4289 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote branch 'gerrit/master' into HEADSamuel Rødal2011-09-061-0/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/corelib/global/qglobal.h src/gui/kernel/qplatformnativeinterface_qpa.h src/gui/widgets/qlinecontrol.cpp src/gui/widgets/qmenu_mac.mm src/gui/widgets/qmenu_p.h src/gui/widgets/qmenubar.cpp src/gui/widgets/qmenubar_p.h src/gui/widgets/widgets.pri src/plugins/platforms/wayland/qwaylandnativeinterface.cpp src/plugins/platforms/wayland/qwaylandnativeinterface.h src/src.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qstring/tst_qstring.cpp Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b