There is a case not to show an image which is enqueued previously.
So added a method to ignore a source buffer
Change-Id: I571af6aff235955d441eef644300033d888003f5
return mImpl->SetSize( width, height );
}
+void NativeImageSourceQueue::IgnoreSourceImage()
+{
+ mImpl->IgnoreSourceImage();
+}
+
bool NativeImageSourceQueue::GlExtensionCreate()
{
return mImpl->GlExtensionCreate();
*/
void SetSize( uint32_t width, uint32_t height );
+ /**
+ * @brief Ignores a source image which is inserted to the queue.
+ *
+ * @note This can be called from worker threads.
+ */
+ void IgnoreSourceImage();
+
private: // native image
/**
mHeight = height;
}
+void NativeImageSourceQueueAndroid::IgnoreSourceImage()
+{
+}
+
bool NativeImageSourceQueueAndroid::GlExtensionCreate()
{
return true;
void SetSize( uint32_t width, uint32_t height ) override;
/**
+ * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
+ */
+ void IgnoreSourceImage() override;
+
+ /**
* destructor
*/
~NativeImageSourceQueueAndroid() override;
virtual void SetSize( uint32_t width, uint32_t height ) = 0;
/**
+ * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
+ */
+ virtual void IgnoreSourceImage() = 0;
+
+ /**
* destructor
*/
virtual ~NativeImageSourceQueue() = default;
ResetEglImageList();
}
+void NativeImageSourceQueueTizen::IgnoreSourceImage()
+{
+ Dali::Mutex::ScopedLock lock( mMutex );
+ tbm_surface_h surface;
+
+ if( tbm_surface_queue_can_acquire( mTbmQueue, 0 ) )
+ {
+ if( tbm_surface_queue_acquire( mTbmQueue, &surface ) != TBM_SURFACE_QUEUE_ERROR_NONE )
+ {
+ DALI_LOG_ERROR( "NativeImageSourceQueueTizen::IgnoreSourceImage: Failed to aquire a tbm_surface\n" );
+ return;
+ }
+
+ if( tbm_surface_internal_is_valid( surface ) )
+ {
+ tbm_surface_queue_release( mTbmQueue, surface );
+ }
+ }
+}
+
bool NativeImageSourceQueueTizen::GlExtensionCreate()
{
mEglImageExtensions = mEglGraphics->GetImageExtensions();
void SetSize( uint32_t width, uint32_t height ) override;
/**
+ * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
+ */
+ void IgnoreSourceImage() override;
+
+ /**
* destructor
*/
~NativeImageSourceQueueTizen() override;
mHeight = height;
}
+void NativeImageSourceQueueX::IgnoreSourceImage()
+{
+}
+
bool NativeImageSourceQueueX::GlExtensionCreate()
{
return true;
void SetSize( uint32_t width, uint32_t height ) override;
/**
+ * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
+ */
+ void IgnoreSourceImage() override;
+
+ /**
* destructor
*/
~NativeImageSourceQueueX() override;