mEglGraphics(NULL),
mEglImageExtensions(NULL),
mOwnTbmQueue(false),
- mBlendingRequired(false)
+ mBlendingRequired(false),
+ mIsResized(false)
{
DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
{
Dali::Mutex::ScopedLock lock(mMutex);
- tbm_surface_queue_reset(mTbmQueue, width, height, tbm_surface_queue_get_format(mTbmQueue));
+ if(mWidth == width && mHeight == height)
+ {
+ return;
+ }
- mWidth = width;
- mHeight = height;
+ tbm_surface_queue_reset(mTbmQueue, width, height, tbm_surface_queue_get_format(mTbmQueue));
- ResetEglImageList();
+ mWidth = width;
+ mHeight = height;
+ mIsResized = true;
}
void NativeImageSourceQueueTizen::IgnoreSourceImage()
{
Dali::Mutex::ScopedLock lock(mMutex);
- ResetEglImageList();
+ ResetEglImageList(true);
}
uint32_t NativeImageSourceQueueTizen::TargetTexture()
}
}
+ if(mIsResized)
+ {
+ ResetEglImageList(false);
+ mIsResized = false;
+ }
+
if(mConsumeSurface)
{
bool existing = false;
return false;
}
-void NativeImageSourceQueueTizen::ResetEglImageList()
+void NativeImageSourceQueueTizen::ResetEglImageList(bool releaseConsumeSurface)
{
- if(mConsumeSurface)
+ // When Tbm surface queue is reset(resized), the surface acquired before reset() is still valid, not the others.
+ // We can still use the acquired surface so that we will release it as the oldSurface in PrepareTexture() when the next surface is ready.
+ if(releaseConsumeSurface && mConsumeSurface)
{
if(tbm_surface_internal_is_valid(mConsumeSurface))
{