diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-08 00:28:08 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-08 00:28:08 (GMT) |
commit | fd30747b5b54a760ca280ad1e75ce87026478f5e (patch) | |
tree | f66a08fb660cb66c1babd0813a5830df9b1df63d /src/openvg/qpixmapdata_vg.cpp | |
parent | fe239b32550e83e8a42617457adca8d7922ff92f (diff) | |
download | Qt-fd30747b5b54a760ca280ad1e75ce87026478f5e.zip Qt-fd30747b5b54a760ca280ad1e75ce87026478f5e.tar.gz Qt-fd30747b5b54a760ca280ad1e75ce87026478f5e.tar.bz2 |
Replace qt_vg_imageBits() with constBits() in the OpenVG code
Reviewed-by: Sarah Smith
Diffstat (limited to 'src/openvg/qpixmapdata_vg.cpp')
-rw-r--r-- | src/openvg/qpixmapdata_vg.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 3087b77..44814cc 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -231,14 +231,6 @@ QPaintEngine* QVGPixmapData::paintEngine() const return source.paintEngine(); } -// This function works around QImage::bits() making a deep copy if the -// QImage is not const. We force it to be const and then get the bits. -// XXX: Should add a QImage::constBits() in the future to replace this. -const uchar *qt_vg_imageBits(const QImage& image) -{ - return image.bits(); -} - VGImage QVGPixmapData::toVGImage() { if (!isValid()) @@ -271,7 +263,7 @@ VGImage QVGPixmapData::toVGImage() if (!source.isNull() && recreate) { vgImageSubData (vgImage, - qt_vg_imageBits(source), source.bytesPerLine(), + source.constBits(), source.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0, w, h); } @@ -670,7 +662,7 @@ void* QVGPixmapData::toNativeType(NativeType type) if (bitmap) { if (bitmap->Create(TSize(source.width(), source.height()), EColor16MAP) == KErrNone) { - const uchar *sptr = qt_vg_imageBits(source); + const uchar *sptr = source.constBits(); bitmap->BeginDataAccess(); uchar *dptr = (uchar*)bitmap->DataAddress(); |