本文整理汇总了C++中CFbsBitmap::ExtendedBitmapType方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitmap::ExtendedBitmapType方法的具体用法?C++ CFbsBitmap::ExtendedBitmapType怎么用?C++ CFbsBitmap::ExtendedBitmapType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFbsBitmap
的用法示例。
在下文中一共展示了CFbsBitmap::ExtendedBitmapType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fromNativeType
void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
{
if (type == QPixmapData::SgImage && pixmap) {
#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
RSgImage *sgImage = reinterpret_cast<RSgImage*>(pixmap);
destroyImages();
prevSize = QSize();
TInt err = 0;
RSgDriver driver;
err = driver.Open();
if (err != KErrNone) {
cleanup();
return;
}
if (sgImage->IsNull()) {
cleanup();
driver.Close();
return;
}
TSgImageInfo sgImageInfo;
err = sgImage->GetInfo(sgImageInfo);
if (err != KErrNone) {
cleanup();
driver.Close();
return;
}
pfnVgCreateEGLImageTargetKHR vgCreateEGLImageTargetKHR = (pfnVgCreateEGLImageTargetKHR) eglGetProcAddress("vgCreateEGLImageTargetKHR");
if (eglGetError() != EGL_SUCCESS || !(QEgl::hasExtension("EGL_KHR_image") || QEgl::hasExtension("EGL_KHR_image_pixmap")) || !vgCreateEGLImageTargetKHR) {
cleanup();
driver.Close();
return;
}
const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE};
EGLImageKHR eglImage = QEgl::eglCreateImageKHR(QEgl::display(),
EGL_NO_CONTEXT,
EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer)sgImage,
(EGLint*)KEglImageAttribs);
if (eglGetError() != EGL_SUCCESS) {
cleanup();
driver.Close();
return;
}
vgImage = vgCreateEGLImageTargetKHR(eglImage);
if (vgGetError() != VG_NO_ERROR) {
cleanup();
QEgl::eglDestroyImageKHR(QEgl::display(), eglImage);
driver.Close();
return;
}
w = sgImageInfo.iSizeInPixels.iWidth;
h = sgImageInfo.iSizeInPixels.iHeight;
d = 32; // We always use ARGB_Premultiplied for VG pixmaps.
is_null = (w <= 0 || h <= 0);
source = QImage();
recreate = false;
prevSize = QSize(w, h);
setSerialNumber(++qt_vg_pixmap_serial);
// release stuff
QEgl::eglDestroyImageKHR(QEgl::display(), eglImage);
driver.Close();
#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
bool deleteSourceBitmap = false;
#ifdef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
// Rasterize extended bitmaps
TUid extendedBitmapType = bitmap->ExtendedBitmapType();
if (extendedBitmapType != KNullUid) {
bitmap = createBlitCopy(bitmap);
deleteSourceBitmap = true;
}
#endif
if (bitmap->IsCompressedInRAM()) {
bitmap = createBlitCopy(bitmap);
deleteSourceBitmap = true;
}
TDisplayMode displayMode = bitmap->DisplayMode();
QImage::Format format = qt_TDisplayMode2Format(displayMode);
TSize size = bitmap->SizeInPixels();
bitmap->BeginDataAccess();
//.........这里部分代码省略.........