summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-22 09:24:51 (GMT)
committeraxis <qt-info@nokia.com>2010-03-22 09:24:51 (GMT)
commite48850c6ec90cd5eaa95d07573c2afa1a1c4f67f (patch)
treec53fa338b532c986b4baa1b481e5406f2fa16b5a /src/openvg
parent390d7f64d9afa288fb2c01fc70eddc8b1f5ff585 (diff)
parent7491a2ecfdd0fe883c72d2ee60ca72393c2990d9 (diff)
downloadQt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.zip
Qt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.tar.gz
Qt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.tar.bz2
Merge branch '4.6-s60' into 4.7-s60
Conflicts: configure.exe mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h src/gui/kernel/qapplication.cpp src/gui/text/qtextlayout.cpp src/openvg/qpixmapdata_vg.cpp src/s60installs/s60installs.pro tools/runonphone/main.cpp tools/runonphone/serenum_unix.cpp qtextlayout.cpp fixed up together with Eskil. Kept the configure.exe from 4.7 without recompile.
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/openvg.pro2
-rw-r--r--src/openvg/qpixmapdata_vg.cpp65
2 files changed, 33 insertions, 34 deletions
diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
index c8c9917..3790492 100644
--- a/src/openvg/openvg.pro
+++ b/src/openvg/openvg.pro
@@ -33,6 +33,8 @@ contains(QT_CONFIG, egl) {
qwindowsurface_vgegl.cpp
}
+symbian: DEFINES += QVG_RECREATE_ON_SIZE_CHANGE
+
include(../qbase.pri)
unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 53f6b4c..e66d80b 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -45,10 +45,10 @@
#include "qvg_p.h"
#include "qvgimagepool_p.h"
-#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
#include <private/qt_s60_p.h>
#include <fbs.h>
-#include <graphics/sgimage.h>
+#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
+#include <sgresource/sgimage.h>
typedef EGLImageKHR (*pfnEglCreateImageKHR)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, EGLint*);
typedef EGLBoolean (*pfnEglDestroyImageKHR)(EGLDisplay, EGLImageKHR);
typedef VGImage (*pfnVgCreateEGLImageTargetKHR)(VGeglImageKHR);
@@ -465,23 +465,24 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
TInt err = 0;
- err = SgDriver::Open();
- if(err != KErrNone) {
+ RSgDriver driver;
+ err = driver.Open();
+ if (err != KErrNone) {
cleanup();
return;
}
- if(sgImage->IsNull()) {
+ if (sgImage->IsNull()) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
TSgImageInfo sgImageInfo;
err = sgImage->GetInfo(sgImageInfo);
- if(err != KErrNone) {
+ if (err != KErrNone) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
@@ -489,9 +490,9 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
pfnEglDestroyImageKHR eglDestroyImageKHR = (pfnEglDestroyImageKHR) eglGetProcAddress("eglDestroyImageKHR");
pfnVgCreateEGLImageTargetKHR vgCreateEGLImageTargetKHR = (pfnVgCreateEGLImageTargetKHR) eglGetProcAddress("vgCreateEGLImageTargetKHR");
- if(eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
+ if (eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
@@ -502,17 +503,17 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
(EGLClientBuffer)sgImage,
(EGLint*)KEglImageAttribs);
- if(eglGetError() != EGL_SUCCESS) {
+ if (eglGetError() != EGL_SUCCESS) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
vgImage = vgCreateEGLImageTargetKHR(eglImage);
- if(vgGetError() != VG_NO_ERROR) {
+ if (vgGetError() != VG_NO_ERROR) {
cleanup();
eglDestroyImageKHR(QEgl::display(), eglImage);
- SgDriver::Close();
+ driver.Close();
return;
}
@@ -526,7 +527,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
setSerialNumber(++qt_vg_pixmap_serial);
// release stuff
eglDestroyImageKHR(QEgl::display(), eglImage);
- SgDriver::Close();
+ driver.Close();
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
@@ -584,29 +585,25 @@ void* QVGPixmapData::toNativeType(NativeType type)
if (type == QPixmapData::SgImage) {
toVGImage();
- if(!isValid() || vgImage == VG_INVALID_HANDLE)
+ if (!isValid() || vgImage == VG_INVALID_HANDLE)
return 0;
TInt err = 0;
- err = SgDriver::Open();
- if(err != KErrNone)
+ RSgDriver driver;
+ err = driver.Open();
+ if (err != KErrNone)
return 0;
TSgImageInfo sgInfo;
sgInfo.iPixelFormat = EUidPixelFormatARGB_8888_PRE;
sgInfo.iSizeInPixels.SetSize(w, h);
- sgInfo.iUsage = ESgUsageOpenVgImage | ESgUsageOpenVgTarget;
- sgInfo.iShareable = ETrue;
- sgInfo.iCpuAccess = ESgCpuAccessNone;
- sgInfo.iScreenId = KSgScreenIdMain; //KSgScreenIdAny;
- sgInfo.iUserAttributes = NULL;
- sgInfo.iUserAttributeCount = 0;
+ sgInfo.iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface;
RSgImage *sgImage = q_check_ptr(new RSgImage());
err = sgImage->Create(sgInfo, NULL, NULL);
- if(err != KErrNone) {
- SgDriver::Close();
+ if (err != KErrNone) {
+ driver.Close();
return 0;
}
@@ -614,8 +611,8 @@ void* QVGPixmapData::toNativeType(NativeType type)
pfnEglDestroyImageKHR eglDestroyImageKHR = (pfnEglDestroyImageKHR) eglGetProcAddress("eglDestroyImageKHR");
pfnVgCreateEGLImageTargetKHR vgCreateEGLImageTargetKHR = (pfnVgCreateEGLImageTargetKHR) eglGetProcAddress("vgCreateEGLImageTargetKHR");
- if(eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
- SgDriver::Close();
+ if (eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
+ driver.Close();
return 0;
}
@@ -625,17 +622,17 @@ void* QVGPixmapData::toNativeType(NativeType type)
EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer)sgImage,
(EGLint*)KEglImageAttribs);
- if(eglGetError() != EGL_SUCCESS) {
+ if (eglGetError() != EGL_SUCCESS) {
sgImage->Close();
- SgDriver::Close();
+ driver.Close();
return 0;
}
VGImage dstVgImage = vgCreateEGLImageTargetKHR(eglImage);
- if(vgGetError() != VG_NO_ERROR) {
+ if (vgGetError() != VG_NO_ERROR) {
eglDestroyImageKHR(QEgl::display(), eglImage);
sgImage->Close();
- SgDriver::Close();
+ driver.Close();
return 0;
}
@@ -643,14 +640,14 @@ void* QVGPixmapData::toNativeType(NativeType type)
vgImage, 0, 0,
w, h, VG_FALSE);
- if(vgGetError() != VG_NO_ERROR) {
+ if (vgGetError() != VG_NO_ERROR) {
sgImage->Close();
sgImage = 0;
}
// release stuff
vgDestroyImage(dstVgImage);
eglDestroyImageKHR(QEgl::display(), eglImage);
- SgDriver::Close();
+ driver.Close();
return reinterpret_cast<void*>(sgImage);
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);