summaryrefslogtreecommitdiffstats
path: root/src/openvg/qvg_symbian.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Handle QVolatileImage-backed pixmaps optimally in drawPixmap().Laszlo Agocs2011-06-161-0/+5
| | | | | | | | | | | | | | When drawing such pixmaps (used by both the openvg and opengl graphics systems) onto another pixmap or to a QImage, the performance was sub-optimal due to missing and accidentally disabled support specific to QVolatileImage. This is now fixed and drawing pixmaps into a QImage is also made optimal by using the QS60PaintEngine for QImage too. This will cause a 5-7x (or even up to 12x on certain hardware and platform) increase in offscreen pixmap drawing performance. Task-number: QTBUG-19880 Reviewed-by: Jani Hautakangas
* Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Changed s60 style not to rely on QPixmapData::toNativeType().Laszlo Agocs2011-03-211-2/+0
| | | | | | | | | Forcing VG (and GL) pixmapdata to support toNativeType() with type VolatileImage is unnecessary. It is cleaner to try doing a fromNativeType() with bitmap+mask and fall back if that results in a null pixmapdata. Reviewed-by: Jani Hautakangas
* Add missing bitmap locking to QVGPixmapData::fromNativeType.Laszlo Agocs2011-03-211-2/+4
| | | | Reviewed-by: Jani Hautakangas
* Fix for fromSymbianCFbsBitmap changing the source data unexpectedly.Laszlo Agocs2011-03-101-1/+0
| | | | | | | | | | | Inverting the pixels for bitmaps of mode EGray2 is done in-place, which is wrong if the bitmap handle was duplicated. Instead, we need to make a copy. This also means that we cannot treat EGray2 a conversion-less format in openvg, but such images are likely to be used as masks only, so optimizing just for mere drawing in case of this format is not really necessary. Reviewed-by: Jani Hautakangas
* Avoid image conversion in fromSymbianCFbsBitmap for certain formats.Laszlo Agocs2011-03-101-3/+20
| | | | | | | | | | | | | | | | From now on the image data coming from CFbsBitmap will not be forced to RGB32 or ARGB32_Premultiplied in openvg. This allows copy-less creation and drawing of pixmaps not just from bitmaps with display mode EColor16MAP and EColor16MU, but also a few other modes, like EColor64K. Painting into such pixmaps or drawing them via the raster engine is potentially slower in such cases, which is now reflected in the fromSymbianCFbsBitmap documentation. Note that this patch has no effect on extended bitmaps (e.g. skin graphics), those must always be rasterized first regardless of the display mode. Task-number: QTBUG-18027 Reviewed-by: Jani Hautakangas
* Added native image handle provider support in pixmaps on openvg.Laszlo Agocs2011-03-081-0/+45
| | | | | | | | | | | | | | | QNativeImageHandleProvider is a thin interface consisting of get() and release() functions. Pixmaps constructed with such a provider will call these functions to acquire and release a native handle, e.g. a CFbsBitmap or RSgImage pointer in case of Symbian. The behavior is largely similar to constructing pixmaps via fromSymbianCFbsBitmap or fromSymbianRSgImage, with the exception of pixmap hibernation: release() (and subsequently get()) is guaranteed to be called also in case of hibernation, allowing more fine-grained tracking of the usage and lifetime of image data. Task-number: QT-4632 Reviewed-by: Jani Hautakangas
* VGImage readback support in QPixmap on OpenVG.Laszlo Agocs2011-03-071-1/+1
| | | | | | | | | | | Enable readback of pixel data for pixmaps that are constructed directly from a VGImage. These do not have any backing data in main memory (i.e. 'source' is null), however certain operations, like toImage(), fill(), or painting into the pixmap do not work without it. With this patch the data is read back via vgGetImageSubData when needed. Task-number: QT-4669 Reviewed-by: Jani Hautakangas
* Changed QPixmap VG backend to use CFbsBitmap on Symbian.Laszlo Agocs2011-02-281-94/+27
| | | | | | | | | | | | | | Similarly to QS60PixmapData, that is used on raster, QVGPixmapData is also backed by a CFbsBitmap from now on (at least when it makes sense to do so). This allows copy-less bitmap handle duplication in from- and toSymbianCFbsBitmap() in case of certain image formats, reduces local heap usage and improves performance with the s60 style due to a reduced number of pixel data copies. Task-number: QT-2505 Reviewed-by: Jason Barron Reviewed-by: Jani Hautakangas
* Fix the broken QPixmap::fromSymbianRSgImage().Laszlo Agocs2011-02-071-1/+1
| | | | | | | | The retrieved VGImage handle was accidentally assigned to a local variable instead of the member with the same name so it always ended up creating an empty pixmap. Reviewed-by: Jani Hautakangas
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Revert function renaming in QtOpenVG.Jani Hautakangas2010-10-291-1/+1
| | | | | | | Functions were accidentally thought to be in private scope. Renaming broke BC. Reviewed-by: Jason Barron
* Fallback to vgWritePixels in drawPixmap.Jani Hautakangas2010-10-281-2/+1
| | | | | | | | | | Use vgWritePixels, if possible, in case where VGImage for QPixmap can't be allocated due to low GPU memory situation. This patch also renames some VG paint engine internal functions to clarify their purpose. Task-number: QT-3589 Reviewed-by: Jason Barron
* Fix for CFbsBitmap to QPixmap conversion.Jani Hautakangas2010-10-121-1/+2
| | | | | | | | | | Symbian bitmap formats may have different scanline length when compared to QImage formats. We need to define scanline length for intermediate QImage when converting from CFbsBitmap to QPixmap. Task-number: QTBUG-14218 Reviewed-by: Jason Barron
* Fix memory leak in QPixmap::toSymbianRSgImage() when an error occurs.Jason Barron2010-10-081-4/+5
| | | | | | | | | | | | | In the cases where an error occured while converting a QPixmap to a VGImage this function would return without deleting the RSgImage pointer that it created. Fix is to use a QScopedPointer instead. Also don't use q_check_ptr() since this isn't a CBase derived class. In case you are wondering why I didn't use a custom deleter here so that Close() was also called, we need to make sure that Close() is called on the RSgImage instance before calling Close() on the driver. Reviewed-by: mread
* Remove redundant code in SgImage -> VGImage conversion on Symbian.Jason Barron2010-09-141-29/+2
| | | | | | | | | | | Calling the various Khronos getError() functions here is inefficient since it involves a round trip to the GPU and gains nothing since the null handle can be used to test for error conditions at no cost. Also no need to open the RSgDriver because we don't actually need to call any functions on RSgImage, just convert it. Reviewed-by: Alessandro Portale Reviewed-by: Jani Hautakangas
* Minor modifications and optimizations to the Symbian HW glyph cache.Jason Barron2010-07-121-49/+60
| | | | | | | | | | | | After the latest round of API reviews, the Symbian glyph cache has now been moved from GDI to FBS and this required some changes in Qt's implementation. Also incorporate an optimization where we first iterate over the glyph vector to eliminate glyphs that are already cached in Qt's glyph cache. This way we only open the glyph iterator on glyphs that we need. Reviewed-by: Alessandro Portale
* Convert to new EGL API.Jason Barron2010-07-121-45/+40
| | | | | | | Recent changes in Qt's EGL layer required some changes in the code used to convert RSgImage to/from VGImage. Reviewed-by: Gunnar Sletta
* Don't invert glyphs for the default VG font cache on Symbian.Jason Barron2010-07-121-0/+2
| | | | | | | If the hardware glyph cache API is not represent and in use, then the glyphs will not be inverted. Reviewed-by: TrustMe
* Ensure glyphs are upright instead of upside-down.Jason Barron2010-07-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | The OpenVG paint engine traditionally takes glyph images from the alphaMapForGlyph() function which returns the glyph image in the upright projection. When it constructs a VGImage from this image, it passes a positive data stride which will read the top scanline of the source image into the bottom scanline of the VGImage due to the VG coordinate system. It then uses the path transform where the 'sy' value of the matrix is set to -1 and this re-inverts everything when drawing. With the Symbian based glyph cache, the VGImage is constructed from a RSgImage which is a hardware resource and compensates for the coordinate system used by VG and GL at the time it is created. In the case of the hardware glyph cache, the glyph image is read into the RSgImage using a negative data stride so it does not need to be inverted when drawn. To allow for this, introduce a flag which indicates that the 'sy' entry of the matrix should be flipped such that the glyph is drawn normally. Also in this patch is a change to the glyph origin which now uses the bottom of the glyph metric bounding rect instead of the top due to orientation of the glyph inside the VGImage. Reviewed-by: Alessandro Portale
* Enable cross-process glyph cache for OpenVG graphics system on Symbian.Jason Barron2010-07-121-20/+55
| | | | | | | | | | | This introduces a specialized OpenVG font cache for the Symbian platform. By using RGlyphDataIterator we can create a VGImage to store inside a VGFont without having to upload our own glyph image. This works by utilizing RSgImage which can be used to share handles to graphics memory across processes thus allowing glyph images to be shared by multiple processes and reducing graphics memory usage. Reviewed-by: Alessandro Portale
* Factor out RSgImage -> VGImage conversion to separate function.Jason Barron2010-07-121-73/+75
| | | | | | | | | | This code will now be used by both the fromNativeType() function and the upcoming glyph cache implementation. We also change the #ifdef's location here slightly because even if we do not have support for RSgImage, we still want to be able to support the CFbsBitmap conversion functions for the OpenVG graphics system. Reviewed-by: Alessandro Portale
* Add new file for Symbian specific VG stuff and add Symbian glyph cache.Jason Barron2010-07-121-0/+348
Factor out the Symbian specific bits of QVGPixmapData into a separate file and introduce our subclassed implementation of the VG font cache. Also make our font cache a friend of the S60 font engine because the cache needs to access the CFont member to create the glyph image. Reviewed-by: Alessandro Portale