uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10RenderPlugin.cpp
branchRCL_3
changeset 52 31fccae4f8a7
parent 51 e5af45d51884
equal deleted inserted replaced
51:e5af45d51884 52:31fccae4f8a7
   563         }
   563         }
   564     iAllowsVisualPBufferSurfaces = found;
   564     iAllowsVisualPBufferSurfaces = found;
   565 #endif
   565 #endif
   566     }
   566     }
   567 
   567 
       
   568 
       
   569 EGLSurface CHuiVg10RenderPlugin::CreatePBufferSurface(EGLDisplay aDisplay,
       
   570             EGLenum aBuffertype, EGLClientBuffer aBuffer, EGLConfig aConfig)
       
   571     {
       
   572     EGLSurface newSurface = EGL_NO_SURFACE;
       
   573     newSurface = eglCreatePbufferFromClientBuffer(aDisplay, aBuffertype, aBuffer, aConfig, NULL);
       
   574 
       
   575     // if oom condition, free all the cached memory and try again
       
   576     if(newSurface == EGL_NO_SURFACE)
       
   577         {
       
   578         if(eglGetError() == EGL_BAD_ALLOC)
       
   579             {
       
   580             CHuiEnv* env = CHuiEnv::Static();  
       
   581             env->HandleOutOfTextureMemory();
       
   582             newSurface = eglCreatePbufferFromClientBuffer(aDisplay, aBuffertype, aBuffer, aConfig, NULL);
       
   583             }
       
   584         }
       
   585     return newSurface;
       
   586     }
       
   587