diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-03-07 12:45:24 (GMT) |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-03-07 12:45:24 (GMT) |
commit | cee7a42f5bf6473cecafc2bf98e9b383cb3edede (patch) | |
tree | cb9abed47016d03d956e59407eb43bf00dc3cae9 /src/openvg/qpixmapdata_vg_p.h | |
parent | dda11ee48e323f4f4c6490822aa8921d5d6e3e69 (diff) | |
download | Qt-cee7a42f5bf6473cecafc2bf98e9b383cb3edede.zip Qt-cee7a42f5bf6473cecafc2bf98e9b383cb3edede.tar.gz Qt-cee7a42f5bf6473cecafc2bf98e9b383cb3edede.tar.bz2 |
VGImage readback support in QPixmap on OpenVG.
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
Diffstat (limited to 'src/openvg/qpixmapdata_vg_p.h')
-rw-r--r-- | src/openvg/qpixmapdata_vg_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h index c4fd47f..80ff1cb 100644 --- a/src/openvg/qpixmapdata_vg_p.h +++ b/src/openvg/qpixmapdata_vg_p.h @@ -55,7 +55,7 @@ #include <QtGui/private/qpixmap_raster_p.h> #include <QtGui/private/qvolatileimage_p.h> -#include <private/qvg_p.h> +#include "qvg_p.h" #if defined(Q_OS_SYMBIAN) class RSGImage; @@ -126,6 +126,13 @@ public: // VGImage objects to reuse storage. virtual void reclaimImages(); + // If vgImage is valid but source is null, copies pixel data from GPU back + // into main memory and destroys vgImage. For a normal pixmap this function + // does nothing, however if the pixmap was created directly from a VGImage + // (e.g. via SgImage on Symbian) then by doing the readback this ensures + // that QImage-based functions can operate too. + virtual void ensureReadback(bool readOnly) const; + QSize size() const { return QSize(w, h); } #if defined(Q_OS_SYMBIAN) |