summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler error.Aleksandar Sasha Babic2009-11-041-1/+1
| | | | Reviewed-by: Trust Me
* Merge branch '4.6-s60' into 4.6axis2009-11-041-11/+11
|\
| * Fix crash in QApplication autotest introduced by native pixmaps (S60 3.1)Shane Kearns2009-11-031-11/+11
| | | | | | | | | | | | | | | | | | | | Problem was caused by S60 closing a handle under our feet when QApplication is destroyed. To avoid this, we open our own handle for the global lock instead of using the shared one inside CFbsBitmap. Also the global unlock/relock is not needed on S60 3.2 so this can be eliminated and save a few cycles (the function call was a no-op before) Reviewed-by: Jani Hautakangas
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-041-1/+0
|\ \
| * | QGtkStyle refactoringRobert Griebl2009-11-031-1/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | The QGtk class has been refactored into a private d class for QGtkStyle. This allows us to re-use a lot of code for the Maemo5 style without changing a single line in QGtkStyle itself plus we can easily add virtual functions where the two styles need to behave different. There shouldn't be any new functionality added (or old functionality lost) by this commit. Reviewed-By: jbache Reviewed-By: Ralf Engels
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-031-4/+8
|\ \
| * \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-032-8/+15
| |\ \
| * | | Fixed crash in QPixmap::fromImage with an Indexed8 without a colortable.Gunnar Sletta2009-11-031-4/+8
| | | | | | | | | | | | | | | | Reviewed-by: Trond
* | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-035-13/+26
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/|
| * | Merge commit 'origin/4.6' into featureJørgen Lind2009-11-024-37/+36
| |\ \
| | * \ Merge branch '4.6-s60' into 4.6axis2009-10-301-10/+12
| | |\ \
| | | * | Fixed crash/drawing artifacts on rotation change on Symbian.axis2009-10-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On every beginDataAccess on the pixmap data, we checked the value of the pointer to the bits and only updated the image if the pointer had changed. However, we didn't take into account that the pointer could be the same, even though the dimensions were different, since malloc() could return the same memory area. This would lead to painting into an image that had the wrong dimensions, which again led to either crashes or image shearing. Fixed by checking the dimensions before deciding to update the image. Task: QTBUG-4815 RevBy: Jason Barron
| | | * | Fix EColor16M conversion in QPixmap::fromSymbianCFbsBitmap()Jani Hautakangas2009-10-281-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EColor16M is in BGR format so after conversion to QImage RGB values needs to be swapped. Reviewed-by: jbarron
| * | | | Fix LIBRARY and ICONJørgen Lind2009-10-294-3/+14
| | |/ / | |/| | | | | | | | | | | | | | | | | | However, compiling with QT_NO_ICON will still not work :( Reviewed-by: tom
* | | | Moved Qt::RenderHint back into QGraphicsBlurEffect and added a hint.Samuel Rødal2009-11-022-8/+15
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Added AnimationHint, which didn't make too much sense in a generic enum, so Qt::RenderHint was moved back into QGraphicsBlurEffect as QGraphicsBlurEffect::BlurHint. Reviewed-by: Gunnar Sletta
* | | Lazily construct QPixmapData's for null pixmapsGunnar Sletta2009-10-308-38/+75
| | | | | | | | | | | | Reviewed-by: Trond
* | | Added QImagePixmapCleanupHooks functions for enabling hooks.Samuel Rødal2009-10-293-3/+22
| |/ |/| | | | | | | | | | | Better than having to befriend QPixmapData and setting is_cached manually. Reviewed-by: Tom Cooksey
* | Added some optimizations to the blur and drop shadow GL filters.Samuel Rødal2009-10-291-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use ExpandToTransparentBorderPadMode since we can use GL_CLAMP_TO_EDGE to clamp to the texture. * Shrink the bounding rects reported by the blur and drop shadow filters (expanding by 2 * radius isn't needed). * Use a single-pass blur for radii <= 3 to avoid the overhead of rendering to an FBO. * Made the fast blur setting generate filters for only a predefined set of radii, and then use the actual blur radius to spread the sample points outwards. * Optimized the generated program to rely less on temporary variables, as those seemed to not be handled very well by certain GLSL compilers. Reviewed-by: Gunnar Sletta
* | Use shared memory images when shared pixmaps are not available.Fredrik Höglund2009-10-271-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Modern graphics drivers tend to disable shared memory pixmaps, since rendering operations often can't be accelerated by the GPU when the pixmap data is pinned in system RAM. Use XShmPutImage() to flush the window surface when this is case, instead of falling back to the slower XPutImage() method. Merge-request: 1684 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-271-0/+3
|\ \ | |/
| * QPixmap::loadFromData: Do not crash on empty/invalid data/lengthMarkus Goetz2009-10-261-0/+3
| | | | | | | | | | Task-number: 262636 Reviewed-by: gunnar
* | Made blur and drop shadow APIs use qreal instead of int for blur radius.Samuel Rødal2009-10-272-14/+14
|/ | | | | | | There's no reason to lock ourselves to int in the API when some of the backend could handle floating point blur radii. Reviewed-by: Bjørn Erik Nilsen
* updated documentation for QPixmap::fromImage()Gunnar Sletta2009-10-221-5/+7
|
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-10-221-7/+16
|\
| * Added doc warning about ARGB32 image drawing and fixed format docsGunnar Sletta2009-10-211-7/+16
| |
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-222-7/+13
|\ \ | |/ |/| | | | | Conflicts: src/gui/painting/qtextureglyphcache.cpp
| * Use premultiplied alpha pixel format in SymbianShane Kearns2009-10-201-7/+12
| | | | | | | | | | | | | | | | | | Gives better performance in the raster paint engine. For Symbian 9.3 onwards, this can also be used as the native pixmap format. For 9.2, conversion is required. Reviewed-by: Sami Merila Reviewed-by: Jani Hautakangas
| * Fix crash in QPixmapCache.David Faure2009-10-191-0/+1
| | | | | | | | | | | | | | QCache destruction accesses the key array that was freed in the QPixmapCache destruction, so better clear() before deleting that key. Merge-request: 1820 Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Add an assert testing the cleanup hooks exist before executing themTom Cooksey2009-10-191-0/+1
| | | | | | | | Reviewed-By: TrustMe
* | Add a new QX11GLPixmapData which renders to X pixmaps using GLTom Cooksey2009-10-191-0/+1
| | | | | | | | | | Enable it by setting QT_USE_X11GL_PIXMAPS environment variable while using the -graphicssystem opengl
* | Separate modification & destruction pixmap cleanup hooksTom Cooksey2009-10-193-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Before the QExplicitlySharedDataPointer change, the ref-count was 0 when calling the cleanup hooks from ~QPixmap. That enabled the hook to figure out if the pixmap is being modified or deleted. As the ref count is now 1 when calling the cleanup hooks in ~QPixmap, we need to seperate the hooks. This change should make using textre-from-pixmap faster as the EGL/glX surface wont get re-created everytime the pixmap is modified. Reviewed-By: Gunnar
* | Fixed slow QPixmap::fill() when the pixmap is sharing data.Kim Motoyoshi Kalland2009-10-191-1/+11
|/ | | | | | | | | | If the pixmap is sharing data with other pixmaps, it must be detached before it is filled. Instead of detaching by making a copy, create a new uninitialized data object since all pixels are overwritten by fill() anyway. Task-number: QTBUG-3228 Reviewed-by: Trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-192-0/+8
|\
| * Use the fallback icon theme name, if the system icon theme name can not be ↵Robert Griebl2009-10-151-0/+4
| | | | | | | | | | | | | | | | determined. This restores the behavior from before the the gui plugin merge. Reviewed-by: Olivier Goffart
| * Fix themed icon loader on DEs other than KDE and Gnome.Robert Griebl2009-10-151-0/+2
| | | | | | | | | | | | Make sure that we at least try to load an icon via the "hicolor" theme. Reviewed-by: Olivier Goffart
| * Second attempt: Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-0/+2
| | | | | | | | | | | | | | The previous commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5 included some changes which were not meant to be pushed. Reviewed-by: TrustMe
| * Revert "Fixed a few compiler warnings from QtGui for Symbian."Janne Anttila2009-10-131-2/+0
| | | | | | | | | | | | Accidentally used git commit -a when should have used only git commit :( This reverts commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5.
| * Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-0/+2
| | | | | | | | Reviewed-by: TrustMe
* | Fixed QPainter::begin() so that it fails gracefully.Kim Motoyoshi Kalland2009-10-151-0/+3
| | | | | | | | | | | | | | | | | | | | Fixed QPainter::begin() so that if it fails, it can still be used on other paint devices without causing an assert. Autotest included. I also made begin() fail on images with the QImage::Format_Indexed8 format and added warnings in the documentation since painting on such images is not supported. Reviewed-by: Trond
* | Optimized raster drop shadow filter to only blur alpha channel.Samuel Rødal2009-10-151-24/+27
| | | | | | | | Reviewed-by: Gunnar
* | Added qt_toRasterPixmap functions.Samuel Rødal2009-10-141-0/+23
| | | | | | | | | | | | | | Similar to the existing qt_toX11Pixmap, this lets us explicitly create pixmaps with the raster pixmap backend. Reviewed-by: Gunnar Sletta
* | Added QPixmapData::createCompatiblePixmapData() used by QPixmap::copy().Samuel Rødal2009-10-149-8/+38
| | | | | | | | | | | | QPixmap::copy() now returns a pixmap with the same pixmap backend. Reviewed-by: Gunnar Sletta
* | Fixed documentation of QPixmap::x11Info() to not talk about widgets.Samuel Rødal2009-10-121-5/+5
| | | | | | | | Reviewed-by: Trond
* | Fixed bug where calling fill on pixmap with active painter would crash.Kim Motoyoshi Kalland2009-10-091-0/+10
|/ | | | | | | | | | | Calling QPixmap::fill() on a pixmap may in some cases cause the painter's paint engine pointer to become stale. A subsequent call to the painter would therefore crash. Now, QPixmap::fill() will print a warning and return in those cases. I also added a warning in the documentation of QPixmap::fill(). Task-number: QTBUG-2832 Reviewed-by: Trond
* Fix to Symbian accelerated scrolling problem.Jani Hautakangas2009-10-082-28/+21
| | | | | | | | | | The reason for scrolling bug was that CFbsBitmapDevice wasn't informed if CFbsBitmap was resized. However, it seems that scroll implementation in QRasterPixmapData is faster that CFbsBitGc->CopyRect so this is also a patch which changes QS60PixmapData's scroll function to call QRasterPixmapData::scroll(). Reviewed-by: Janne Koskinen
* QGuiPlatformPlugin: QFileIconProvider and QIcon backend.Olivier Goffart2009-10-072-82/+11
| | | | | | | | | | | | | | | Add a backend for QFileIconProvider in the platform plugin Also change the QIcon::fromTheme backend in the platform plugin: On KDE, we unfortunately can't use KIcon as backend, as the current API doesn't let us know easily (and quickly) wether we should use the fallback or not (KDE always fallback to the question mark "unknown" icon) So we will use the QIconLoader even on KDE. But we need to make sure that the theme name and the icon search paths are correct. Ask that to the platform plugin Reviewed-by: Jens Bache-Wiig
* Integrate the GuiPlatformPlugin interfaceOlivier Goffart2009-10-071-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This is an internal interface for plugins that can be provided by the platform to give platform-specific features by platforms built on top of Qt. We can easlily integrate Qt on Windows, Mac, Gnome, ... without any plugin because we can link to their respective library (dynamically if we don't want to depend on it). On Gnome, we can dynamically resolve Gtk+ symbols. This is however not possible for KDE or other platform built on top of Qt: we can't link against their library because they depend on us and we can't dynamically resolve the symbols because they are mangled (C++) So this plugin provides hooks inside Qt to be able to do things like native File or Color dialog, native icons, accurate reading of the config file, and so on. This is currently private API. Task-number: QT-406 Reviewed-by: Jens Bache-Wiig Reviewed-by: Oswald Buddenhagen
* Symbain crash fix for QPixmap->QImage conversion.Alessandro Portale2009-10-051-1/+6
| | | | | | | | | | | In some cases the QImage, returned by QS60PixmapData::toImage() image an invalid pointer. That led to reproducable crashes on 3.1 Device and Emulator when starting a drag in the FridgeMagnets demo. Jani Hautakangas created this fix and I tested it on 3.1 Device and Emulator confirming that the crash is gone. Rev-By: Jani Hautakangas Rev-By: Alessandro Portale
* Made X11 pixmap backend's fromImage() check for Qt::NoOpaqueDetection.Samuel Rødal2009-10-051-2/+9
| | | | Reviewed-by: Gunnar
* Made X11 QPixmap backend return proper pixmap in alphaChannel().Samuel Rødal2009-10-051-2/+5
| | | | Reviewed-by: Gunnar