uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Texture.cpp
branchRCL_3
changeset 19 e5af45d51884
parent 18 1801340c26a2
child 20 31fccae4f8a7
equal deleted inserted replaced
18:1801340c26a2 19:e5af45d51884
  1254     VGImageFormat imageInternalFormat = VG_sARGB_8888_PRE;
  1254     VGImageFormat imageInternalFormat = VG_sARGB_8888_PRE;
  1255 #else
  1255 #else
  1256     VGImageFormat imageInternalFormat = VG_sARGB_8888;
  1256     VGImageFormat imageInternalFormat = VG_sARGB_8888;
  1257 #endif
  1257 #endif
  1258     
  1258     
  1259     VGbitfield qualityFlags = VG_IMAGE_QUALITY_NONANTIALIASED | VG_IMAGE_QUALITY_BETTER | VG_IMAGE_QUALITY_FASTER;
  1259     VGbitfield qualityFlags = VG_IMAGE_QUALITY_NONANTIALIASED; // | VG_IMAGE_QUALITY_BETTER | VG_IMAGE_QUALITY_FASTER;
  1260     image = vgCreateImage(imageInternalFormat, aDestSize.iWidth, aDestSize.iHeight, qualityFlags);
  1260     image = vgCreateImage(imageInternalFormat, aDestSize.iWidth, aDestSize.iHeight, qualityFlags);
  1261     
  1261     
  1262     // Get the configs and displays etc. needed for creating the surface
  1262     // Get the configs and displays etc. needed for creating the surface
  1263     EGLDisplay display = iRenderPlugin.EglDisplay();
  1263     EGLDisplay display = iRenderPlugin.EglDisplay();
  1264 
  1264 
  1286     ASSERT(configCount > 0);
  1286     ASSERT(configCount > 0);
  1287     EGLConfig config = iRenderPlugin.EglConfig(0);
  1287     EGLConfig config = iRenderPlugin.EglConfig(0);
  1288 #endif
  1288 #endif
  1289     
  1289     
  1290     // The VGImage will act as the surface, so the drawing will go directly to the VGImage
  1290     // The VGImage will act as the surface, so the drawing will go directly to the VGImage
  1291     // Note - we do not call iRenderPlugin.CreatePBufferSurface since that could call
       
  1292     // CHuiEnv::HandleOutOfTextureMemory and that could cause this texture to be reset.
       
  1293     EGLSurface newSurface = eglCreatePbufferFromClientBuffer(
  1291     EGLSurface newSurface = eglCreatePbufferFromClientBuffer(
  1294         display, EGL_OPENVG_IMAGE,
  1292         display, EGL_OPENVG_IMAGE,
  1295         static_cast<EGLClientBuffer>(image),    // Use the image as buffer
  1293         static_cast<EGLClientBuffer>(image),    // Use the image as buffer
  1296         config, NULL);
  1294         config, NULL);
  1297         
  1295     
  1298     // Report error in debug mode, if failed creating the surface
  1296     // Report error in debug mode, if failed creating the surface
  1299     if ( newSurface == EGL_NO_SURFACE )
  1297     if ( newSurface == EGL_NO_SURFACE )
  1300         {
  1298         {
  1301         HUI_DEBUG1(_L("CHuiVg10Texture::CreateRenderedImage() - EGL Surface could not be created, eglErr: %04x"), eglGetError() );
  1299         HUI_DEBUG1(_L("CHuiVg10Texture::CreateRenderedImage() - EGL Surface could not be created, eglErr: %04x"), eglGetError() );
  1302         if ( image != VG_INVALID_HANDLE )
  1300         if ( image != VG_INVALID_HANDLE )