summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
...
* Mark some functions as always_inline with GCC and ICC.Thiago Macieira2012-04-241-0/+3
| | | | | | | | These functions are too critical to be called. They should always be inlined. Change-Id: I698dc6d83e02c323759c6d066f17993340bd53a5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-1723-1848/+90
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-1611-134/+83
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * | Remove QPaintBufferSignalProxy and QPaintBufferResource.Robin Burchell2012-04-122-89/+0
| | | | | | | | | | | | | | | | | | | | | Nothing seems to use these... Change-Id: I58b3e5f8536e43b3076da0a86d9093a6e11b947a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Remove 'using' of QPaintEngineEx methods from QRasterPaintEngine.Robin Burchell2012-04-121-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | drawEllipse() and the drawPolygon() overloads are all reimplemented, so there is no point having this here. Change-Id: I343cea0dd0fff2ed6a27be2a19459056e929f9d8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Remove unused QIntRect.Robin Burchell2012-04-121-13/+0
| | | | | | | | | | | | | | | | | | | | | I can't find any uses of this anywhere, in either Qt 4 or Qt 5. Change-Id: Ibf747b57b4afdd81e11631e87a80dcab5ac12f69 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Move QVectorPath::polygonFlags to its own class.Robin Burchell2012-04-112-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | Who can say why it was put in QPaintEngineEx's header, but it certainly doesn't belong there. Change-Id: Ieb3b977affcf4b240f621d13b72bdc0e8f8138b9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Move QRectVectorPath into the .cpp of the only file actually using it.Robin Burchell2012-04-112-48/+48
| | | | | | | | | | | | | | | Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-108-53/+99
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * | | Remove all calls to, and deprecate qMalloc, qRealloc and qFree.Robin Burchell2012-03-311-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers should just call the standard allocation functions directly. Adding an extra function call onto all basic memory management for the sake of making it instrumentable in rare cases isn't really fair to everyone else. What's more, this wasn't completely reliable, as not everything was using them in a number of places. Memory management can still be overridden using tricks like LD_PRELOAD if needed. Their aligned equivilents cannot be deprecated, as no standard equivilents exist, although investigation into posix_memalign(3) is a possibility for the future. Change-Id: Ic5f74b14be33f8bc188fe7236c55e15c36a23fc7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | Remove the old code using MMX registers.Thiago Macieira2012-03-289-1639/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are only 8 MMX registers, each 64-bit wide, and they alias the x87 registers. The access to the MMX register cannot use the new VEX-prefix instructions either. All of the functions being replaced are either present in the qdrawhelper_sse2.cpp and qdrawhelper_ssse3.cpp files, or the plain C++ function in qdrawhelper.cpp is vectorised when compiled with -ftree-vectorize (enabled in -O3), if SSE2 support is enabled. All x86-64 processors have SSE2, so this is a net improvement for 64-bit builds. For 32-bit builds, without further support this will cause the code to use non-vector or x87 instructions, which aren't the best. The solution will come in another commit. Change-Id: I4a22d8a2516b79172867510202d0fd627db54807 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | | Remove WA_PaintOutsidePaintEventDebao Zhang2012-03-281-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code to Qt 4 under X11 platform. and it has been broken now. Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | Merge master into api_changesKent Hansen2012-03-275-11/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * \ \ \ Merge "Merge master into api_changes" into refs/staging/api_changesKent Hansen2012-03-2312-15/+918
| |\ \ \ \
| | * \ \ \ Merge master into api_changesKent Hansen2012-03-2312-15/+918
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * | | | | | Cleanup Q3* itemsDebao Zhang2012-03-231-1/+0
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup Q3* items from QtCore and QtGui modules. Change-Id: Id214a077a50e99d820c84e96e34866492a0130d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | | | Got rid of Map / Unmap events in favor of Expose event.Samuel Rødal2012-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since change 2e4d8f67a871f2033 the need for Map and Unmap events has gone away, as now the Expose event is used to notify the application about when it can start rendering. The Map and Unmap events weren't really used except by QWidget to set the WA_Mapped flag, which we now set based on the expose / unexpose. Also guarantee that a Resize event is always sent before the first Expose, by re-introducing an asynchronous expose event handler. Since an expose is required before rendering to a QWindow, show a warning if QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a window that has not received its first expose. Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * | | | | QtGui: make some constructors explicitMarc Mutz2012-03-144-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I5b122db2498dbb2aee50c7ad95c67e708aade45b Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | | | | | Add 'we mean it' header to qpa headersGirish Ramakrishnan2012-04-161-0/+11
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPA api is internal and not meant to be used by app users. Change-Id: I37245e9635bf22f2454e763699dd58eca6565b63 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | | | | widgets: Fix painting to a fully transparent top level widgetHolger Hans Peter Freyther2012-04-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWS used to have a line to change the composite mode from SourceOver to Source for the top level widget. This wasn't used with QPA and I removed the internal DontSetCompositionMode in qtbase. It turns out that the QWS way is the most efficient one to initialize the background of the widget. The alternative is to have the QPlatformBackingStore::beginPaint always clear the entire to be painted area and then paint the background of the widget. The difference of painting each pixel once or twice is noticable on embedded platforms and in the range of one to two fps. Reproduce the issue with: echo "QWidget {background: transparent}" > style.css ./examples/widgets/wiggly/wiggly -stylesheet style.css Task-number: QTBUG-24526 Change-Id: Ica4c980bb3bf6eb87ddb5b510ac7493292d01543 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* | | | | Fold qpaintdevice_qpa.cpp into qpaintdevice.cppGirish Ramakrishnan2012-04-153-66/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I274508826b9be4eb00f67fccae5a18ecbdf41a36 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | | Move QPainterPathPrivate to the private header files.Gunnar Sletta2012-04-135-63/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was made inline for the sake of performance, but has in hindsight proven to be not really worth it. It also prevents us from aligning the internal datastructure of QPainterPath with that of QPolygonF and the internal QVectorPath class which would make mapping between the two inside QPainter a lot faster. Making all this out-of-line now as discussed in the task https://bugreports.qt-project.org/browse/QTBUG-19998 so we can adress this in a binary compatible fashion during Qt 5.x Change-Id: I61058171ed31f8a845fa45517248367c85ce52cd Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | | Fix unsigned comparison warning.Stephen Kelly2012-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8544f47177b68cf29ce9fbebb152ca73db6e219d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | | | | Removed Qt5 todo comment in qpaintengineex_p.hSamuel Rødal2012-04-101-1/+0
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This won't get done for Qt 5, and QtOpenGL still implements this API. Task-number: QTBUG-25069 Change-Id: Ia8437d2a4a5a0e750afdf67764c53d75ee8065f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | | Fix release mode warnings about unused variables.Friedemann Kleint2012-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Variables that are only used in asserts. Change-Id: I0984b676ad9b67f5ae72266b8540e8054163918f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Rename clip() to clipData() to avoid confusion and warningJiang Jiang2012-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are already a bunch of clip() functions in this class. Rename the one for returning clip data to clipData() to make it clearer. It also eliminate a warning when compiling with clang. Change-Id: I1f890ad6bf1c0274a0b38b3116a3ec3d2957d44a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | | | QTBUG-24936: Ensure alpha cache is cleared when printing to PDF.Tarja Sundqvist2012-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added 'd->alphaCache.clear();' to qtbase/src/gui/painting/qpdf.cpp since also the alpha cache needs to cleared when printing to PDF. Task-number: QTBUG-24936 Change-Id: I12c41a98f4bd54c154fa47acebe0421e9a38a3ec Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | The scaling should not effect the width of a cosmetic penAndy Shaw2012-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the scaling effects the pen width so that it is less than 1 pixel in width then it would use the QCosmeticStroker to draw, however this should not be the case for cosmetic pens that are not less than 1 pixel in width as the scaling does not change their width. Task-number: QTBUG-25006 Change-Id: I142db0f3a7ee02aa87171495d5a7a7011100814e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | | Ensure that qdrawhelper.cpp is compiled with vectorisation activeThiago Macieira2012-03-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC option -ftree-vectorize is enabled only at level -O3, so force -O3 if this is an optimised build. Also, ensure that we're using SSE for floating point math if we're in x86 (32-bit) builds. No change is necessary for the Intel compiler, since it enables vectorisation by default at any non-zero -O level. These options are not possible with MSVC. Change-Id: If1169a73cd8a3e8b34d9e21f281b78897b9aec3e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | Introduce FontSmoothingGamma as a platform style hint.Friedemann Kleint2012-03-274-50/+85
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | - Allocate gamma tables on the heap in a thread-safe way, use font smoothing returned by the style hints of the platform to calculate them. - Improve font rendering on Windows. Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Remove the Q_STATIC_TEMPLATE_SPECIALIZATION macroThiago Macieira2012-03-263-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | This was necessary only for older MS Visual Studio versions, which are no longer supported anyway. Change-Id: I6c96fb2340296c34b480716303c93b892419229b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Fix warnings about commas at the end of enumsThiago Macieira2012-03-242-2/+2
| |/ |/| | | | | | | | | | | | | It's non-standard to accept them, so remove them and silence the warnings. Change-Id: I51c5afe99eac408f326ab9fcf40435b60e953b54 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Remove the workaround for GCC 3.3 on IRIXThiago Macieira2012-03-221-12/+0
| | | | | | | | | | | | | | GCC 3.3 is no longer supported. IRIX is no longer supported. Change-Id: I1656a6fdcf2b244f0f6c812e71b0e793d37fb98b Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Fix compilation on ARM with C++11: narrowing conversionThiago Macieira2012-03-223-3/+3
| | | | | | | | | | | | | | Cannot have double-to-float conversions inside { } in C++11. Change-Id: I13c27307efd703420b6667d919bb42c2ee82e6cc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Add a non-implicit virtual destructor for QDashStrokerThiago Macieira2012-03-222-0/+5
| | | | | | | | | | | | | | | | | | The base class has a virtual destructor, so the destructor is already virtual. Make it non-implicit so that the virtual table and other virtual inline methods don't get emitted everywhere. Change-Id: I15296c1114086ff0b1da701ccd51525bec99d76b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | MIPS DSP configure detection and initial blend optimizations.Damir Tatalovic2012-03-227-0/+910
|/ | | | | | | | | | | | | | | | | | | | Adds new MIPS configure test and -no-mips_dsp and -no-mips_dspr2 configure options. List of optimized implementations: - comp_func_SourceOver - comp_func_Source - qt_memfill32 - qt_destFetchARGB32 - qt_destStoreARGB32 - blend [RGB32][RGB32] - blend [ARGB32_Pre][RGB32] - blend [RGB32][ARGB32_Pre] - blend [ARGB32_Pre][ARGB32_Pre] Change-Id: I35411858295b7b3f4895eb56e3b93397528903cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Line up underlines if fallback fonts are used (QTBUG-21832)Stefan Hundhammer2012-03-123-39/+61
| | | | | Change-Id: Icecc514f6c47c0576af8cabd39cdc0987f8d93fa Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Enablers for shared graphics cache in raster paint engineJiang Jiang2012-03-085-25/+36
| | | | | | | | | | | | Required changes for using shared graphics cache for distance field raster glyph rendering. Most of the logic is in platform plugins. Platform plugins should implement QPlatformIntegration::createImagePaintEngine() to create a subclass of QRasterEngine. Change-Id: Icf0a396e722e43b4caa2c1849aae38753cde38f1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* qpa: Document a requirement of the backing store implementationHolger Hans Peter Freyther2012-03-061-0/+3
| | | | | | | | Docuent the requirement that the alpha channels need to be properly initialized by the implementation. Change-Id: I03db81b44b43ea75feb1b983fb0725c65a3bd9f4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-028-262/+262
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Export QPaintEnginePrivate from QtGuiBradley T. Hughes2012-03-021-1/+1
| | | | | | | | This allows the QCoreGraphicsPaintEngine to use QPaintEnginePrivate members (e.g. pdev and drawBoxTextItem()). Change-Id: I5bed3cb007ae469816afce619edd55f155b04fa9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QFixed: make constexprMarc Mutz2012-02-261-68/+68
| | | | | | | | Make most QFixed{,Size,Point} members constexpr. See f3141c58badbd2da9eb42021e9704742c3e52a9b for rationale. Change-Id: I0b44f59bb768e1f79c57e1c9a0dc67afb515e03f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFixed{,Size}: reformulate some functions in a constexpr-friendly wayMarc Mutz2012-02-261-23/+24
| | | | | | | | | | | | | | | | | | The main change is the addition of a new constructor that passes its argument into 'val' verbatim. In order to disambiguate it from the existing QFixed(int) constructor, it takes a second 'int' argument. This is too ugly for public API, so it's private, and only used by static QFixed fromFixed(int), which is the existing named constructor with the same semantics. The rest of the changes simply reformulate their operations in terms of fromFixed(). This makes them ready to be constexpr'ed. Change-Id: I2a3813d62bd4124064755de6b00526a60fc82c1d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove use of Q_BROKEN_DEBUG_STREAM.Stephen Kelly2012-02-224-30/+0
| | | | | | | | No supported compiler defines it, and it was not used consistently so it didn't work anyway. Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.Friedemann Kleint2012-02-201-0/+1
| | | | | | | Forward-declare instead. Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added static keyword to blend_transformed_tiled_argb/rgb565().Kim Motoyoshi Kalland2012-02-141-2/+2
| | | | | Change-Id: I43745c672d5d31ef89901234c04bf2433269462c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removed unused qStorePixel[] array.Kim Motoyoshi Kalland2012-02-141-12/+0
| | | | | Change-Id: I9c9df19fcf06b127aaebb7ab093221e1b254ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed CustomDashLine drawing bug.Samuel Rødal2012-02-081-1/+3
| | | | | | | | | | | The bug was caused by attempting to stroke an empty subpath. If there have been no line-to's emitted we should not try to join the start and end of that line segment. Task-number: QTBUG-23248 Change-Id: I38b7e955ed6683f8fc25f9551e93b4f472c022bf Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com> (cherry picked from commit 593947ba70188df3d33efe031fab2fd255faa8b9)
* Fixed source composition with opacity in the raster paint engine.Kim Motoyoshi Kalland2012-02-081-0/+2
| | | | | | | Task-number: QTBUG-24075 Change-Id: I2b9263364bf30fb8c914823e80e7ea4a8af26035 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>