mWidth = tbm_surface_get_width( mTbmSurface );
mHeight = tbm_surface_get_height( mTbmSurface );
}
-
- if( mEglImageKHRContainer.Size() > 2 )
- {
- mEglImageExtensions->DestroyImageKHR(mEglImageKHRContainer[0]);
- mEglImageKHRContainer.Erase( mEglImageKHRContainer.Begin() );
- }
-
- mEglImageKHRContainer.PushBack( mEglImageKHR );
}
bool NativeImageSource::IsColorDepthSupported( Dali::NativeImageSource::ColorDepth colorDepth )
// casting from an unsigned int to a void *, which should then be cast back
// to an unsigned int in the driver.
EGLClientBuffer eglBuffer = reinterpret_cast< EGLClientBuffer > (mTbmSurface);
+ if( !eglBuffer )
+ {
+ return false;
+ }
mEglImageKHR = mEglImageExtensions->CreateImageKHR( eglBuffer );
void NativeImageSource::GlExtensionDestroy()
{
- mEglImageExtensions->DestroyImageKHR(mEglImageKHR);
+ if( mEglImageKHR )
+ {
+ mEglImageExtensions->DestroyImageKHR(mEglImageKHR);
- mEglImageKHR = NULL;
+ mEglImageKHR = NULL;
+ }
}
unsigned int NativeImageSource::TargetTexture()
namespace Adaptor
{
-class EglImageExtensions;
-namespace
-{
- typedef Dali::Vector< void* > EglImageContainer;
-};
+class EglImageExtensions;
/**
* Dali internal NativeImageSource.
void* mEglImageKHR; ///< From EGL extension
EglImageExtensions* mEglImageExtensions; ///< The EGL Image Extensions
bool mSetSource;
- EglImageContainer mEglImageKHRContainer;
};
} // namespace Adaptor