Actor a = Actor::New();
a.AddRenderer(r);
a.SetSize(10, 10);
- a.SetParentOrigin(ParentOrigin::CENTER);
+ a.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add(a);
application.SendNotification();
unofficial::angle::libEGL
unofficial::angle::libGLESv2
unofficial::cairo::cairo
- dali-core::dali-core
+ dali2-core::dali2-core
)
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
FileFormat formatEncoding,
std::size_t width,
std::size_t height,
- Pixel::Format pixelFormat )
+ Pixel::Format pixelFormat,
+ const uint32_t quality )
{
switch( formatEncoding )
{
case JPG_FORMAT:
{
- return TizenPlatform::EncodeToJpeg( pixelBuffer, encodedPixels, width, height, pixelFormat );
+ return TizenPlatform::EncodeToJpeg( pixelBuffer, encodedPixels, width, height, pixelFormat, quality );
break;
}
case PNG_FORMAT:
const std::size_t width,
const std::size_t height )
{
+ return EncodeToFile( pixelBuffer, filename, pixelFormat, width, height, DEFAULT_JPG_QUALITY );
+}
+
+bool EncodeToFile(const unsigned char* const pixelBuffer,
+ const std::string& filename,
+ const Pixel::Format pixelFormat,
+ const std::size_t width,
+ const std::size_t height,
+ const uint32_t quality )
+{
DALI_ASSERT_DEBUG(pixelBuffer != 0 && filename.size() > 4 && width > 0 && height > 0);
Vector< unsigned char > pixbufEncoded;
const FileFormat format = GetFormatFromFileName( filename );
- const bool encodeResult = EncodeToFormat( pixelBuffer, pixbufEncoded, format, width, height, pixelFormat );
+ const bool encodeResult = EncodeToFormat( pixelBuffer, pixbufEncoded, format, width, height, pixelFormat, quality );
if(!encodeResult)
{
DALI_LOG_ERROR("Encoding pixels failed\n");
#define DALI_ADAPTOR_BITMAP_SAVER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali
{
+static constexpr uint32_t DEFAULT_JPG_QUALITY = 100;
+
/**
* Store the given pixel data to a file.
* The suffix of the filename determines what type of file will be stored,
const std::size_t width,
const std::size_t height);
+/**
+ * Store the given pixel data to a file.
+ * The suffix of the filename determines what type of file will be stored,
+ * currently only jpeg and png formats are supported.
+ *
+ * @param[in] pixelBuffer Pointer to the pixel data
+ * @param[in] filename Filename to save
+ * @param[in] pixelFormat The format of the buffer's pixels
+ * @param[in] width The width of the image in pixels
+ * @param[in] height The height of the image in pixels
+ * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100]
+ *
+ * @return true if the file was saved
+ */
+DALI_ADAPTOR_API bool EncodeToFile(const unsigned char* const pixelBuffer,
+ const std::string& filename,
+ const Pixel::Format pixelFormat,
+ const std::size_t width,
+ const std::size_t height,
+ const uint32_t quality);
+
} // namespace Dali
namespace DevelNativeImageSource\r
{\r
\r
+bool EncodeToFile( NativeImageSource& image, const std::string& filename, const uint32_t quality )\r
+{\r
+ return Dali::Internal::Adaptor::NativeImageSource::GetImplementation( image ).EncodeToFile( filename, quality );\r
+}\r
+\r
uint8_t* AcquireBuffer( NativeImageSource& image, uint16_t& width, uint16_t& height, uint16_t& stride )\r
{\r
return Dali::Internal::Adaptor::NativeImageSource::GetImplementation( image ).AcquireBuffer( width, height, stride );\r
{\r
\r
/**\r
+ * @brief Converts the current pixel contents to either a JPEG or PNG format\r
+ * and write that to the filesystem.\r
+ *\r
+ * @param[in] image The instance of NativeImageSource.\r
+ * @param[in] filename Identify the filesystem location at which to write the encoded image.\r
+ * The extension determines the encoding used.\r
+ * The two valid encoding are (".jpeg"|".jpg") and ".png".\r
+ * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100]\r
+ * @return @c true if the pixels were written, and @c false otherwise\r
+ */\r
+DALI_ADAPTOR_API bool EncodeToFile( NativeImageSource& image, const std::string& filename, const uint32_t quality );\r
+\r
+/**\r
* @brief Acquire buffer and information of an internal native image.\r
*\r
* AcquireBuffer() and ReleaseBuffer() are a pair.\r
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
/**
virtual bool GetMarkerInfo( const std::string& marker, uint32_t& startFrame, uint32_t& endFrame ) const = 0;
/**
+ * @brief Ignores a rendered frame which is not shown yet.
+ */
+ virtual void IgnoreRenderedFrame() = 0;
+
+ /**
* @brief Connect to this signal to be notified when the texture upload is completed.
*
* @return The signal to connect to.
return GetImplementation( *this ).GetMarkerInfo( marker, startFrame, endFrame );
}
+void VectorAnimationRenderer::IgnoreRenderedFrame()
+{
+ GetImplementation( *this ).IgnoreRenderedFrame();
+}
+
VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
{
return GetImplementation( *this ).UploadCompletedSignal();
*/
bool GetMarkerInfo( const std::string& marker, uint32_t& startFrame, uint32_t& endFrame ) const;
+ /**
+ * @brief Ignores a rendered frame which is not shown yet.
+ */
+ void IgnoreRenderedFrame();
+
public: // Signals
/**
GetImplementation( window ).SetAvailableOrientations( orientations );
}
+int32_t GetNativeId( Window window )
+{
+ return GetImplementation( window ).GetNativeId();
+}
+
} // namespace DevelWindow
} // namespace Dali
*/
DALI_ADAPTOR_API void SetAvailableOrientations( Window window, const Dali::Vector<Dali::Window::WindowOrientation>& orientations );
+/**
+ * @brief Gets current window ID.
+ *
+ * @param[in] window The window instance
+ */
+DALI_ADAPTOR_API int32_t GetNativeId( Window window );
+
} // namespace DevelWindow
} // namespace Dali
mAdaptor->RemoveObserver( *mLifeCycleObserver.get() );
mAdaptor->RemoveWindow( this );
+ mAdaptor->DeleteSurface( *mSurface.get() );
+
mAdaptor = nullptr;
}
Dali::Rect<> GetExtents( Dali::Accessibility::CoordType ctype ) override
{
Vector2 screenPosition = actor.GetProperty( Dali::DevelActor::Property::SCREEN_POSITION ).Get< Vector2 >();
- Vector3 size = actor.GetCurrentSize() * actor.GetCurrentWorldScale();
+ Vector3 size = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE );
bool positionUsesAnchorPoint = actor.GetProperty( Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
- Vector3 anchorPointOffSet = size * ( positionUsesAnchorPoint ? actor.GetCurrentAnchorPoint() : AnchorPoint::TOP_LEFT );
+ Vector3 anchorPointOffSet = size * ( positionUsesAnchorPoint ? actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT );
Vector2 position = Vector2( screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y );
return { position.x, position.y, size.x, size.y };
}
std::string GetName() override
{
- return actor.GetName();
+ return actor.GetProperty< std::string >( Dali::Actor::Property::NAME );
}
std::string GetDescription() override
{
#include <dali/internal/adaptor/common/adaptor-builder-impl.h>
// EXTERNAL INCLUDES
+#include <errno.h>
+#include <sys/stat.h>
#include <dali/public-api/common/stage.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/object/any.h>
DALI_ASSERT_DEBUG( defaultWindow->GetSurface() && "Surface not initialized" );
- mGraphics = &( graphicsFactory.Create() );
+ mGraphics = std::unique_ptr< GraphicsInterface >( &graphicsFactory.Create() );
mGraphics->Initialize( mEnvironmentOptions );
- auto eglGraphics = static_cast<EglGraphics *>( mGraphics ); // This interface is temporary until Core has been updated to match
+ GraphicsInterface* graphics = mGraphics.get(); // This interface is temporary until Core has been updated to match
+ auto eglGraphics = static_cast<EglGraphics *>( graphics );
// This will only be created once
eglGraphics->Create();
std::string systemCachePath = GetSystemCachePath();
if( ! systemCachePath.empty() )
{
- const int dir_err = system( std::string( "mkdir " + systemCachePath ).c_str() );
- if (-1 == dir_err)
+ const int dir_err = mkdir( systemCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH );
+ if ( 0 != dir_err && errno != EEXIST )
{
- printf( "Error creating system cache directory: %s!\n", systemCachePath.c_str() );
- exit(1);
+ DALI_LOG_ERROR( "Error creating system cache directory: %s!\n", systemCachePath.c_str() );
+ exit( 1 );
}
}
}
}
+void Adaptor::DeleteSurface( Dali::RenderSurfaceInterface& surface )
+{
+ // Flush the event queue to give the update-render thread chance
+ // to start processing messages for new camera setup etc as soon as possible
+ ProcessCoreEvents();
+
+ // This method blocks until the render thread has finished rendering the current surface.
+ mThreadController->DeleteSurface( &surface );
+}
+
Dali::RenderSurfaceInterface& Adaptor::GetSurface() const
{
return *mWindows.front()->GetSurface();
GraphicsInterface& Adaptor::GetGraphicsInterface()
{
DALI_ASSERT_DEBUG( mGraphics && "Graphics interface not created" );
- return *mGraphics;
+ return *( mGraphics.get() );
}
Dali::Integration::PlatformAbstraction& Adaptor::GetPlatformAbstractionInterface()
if (mGraphics)
{
- auto eglGraphics = static_cast<EglGraphics *>( mGraphics ); // This interface is temporary until Core has been updated to match
+ GraphicsInterface* graphics = mGraphics.get(); // This interface is temporary until Core has been updated to match
+ auto eglGraphics = static_cast<EglGraphics *>( graphics );
EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
display = eglImpl.GetDisplay();
return mConfigurationManager->IsMultipleWindowSupported();
}
-bool Adaptor::IsRenderingWindows() const
-{
- return ( mThreadController && mThreadController->IsRenderingWindows() );
-}
-
void Adaptor::RequestUpdateOnce()
{
if( mThreadController )
bool RemoveWindow( Dali::Internal::Adaptor::SceneHolder* childWindow );
/**
+ * @brief Deletes the rendering surface
+ * @param[in] surface to delete
+ */
+ void DeleteSurface( Dali::RenderSurfaceInterface& surface );
+
+ /**
* @brief Retrieve the window that the given actor is added to.
*
* @param[in] actor The actor
*/
bool IsMultipleWindowSupported() const;
- /**
- * @brief Checks whether the windows are being rendered in the render thread.
- *
- * @return true if the windows are being rendered in the render thread, or false if not.
- */
- bool IsRenderingWindows() const;
-
public: //AdaptorInternalServices
/**
Dali::Integration::Core* mCore; ///< Dali Core
ThreadController* mThreadController; ///< Controls the threads
- GraphicsInterface* mGraphics; ///< Graphics interface
+ std::unique_ptr< GraphicsInterface > mGraphics; ///< Graphics interface
Dali::DisplayConnection* mDisplayConnection; ///< Display connection
WindowContainer mWindows; ///< A container of all the Windows that are currently created
mPendingRequestUpdate( FALSE ),
mUseElapsedTimeAfterWait( FALSE ),
mNewSurface( NULL ),
+ mDeletedSurface( nullptr ),
mPostRendering( FALSE ),
mSurfaceResized( FALSE ),
mForceClear( FALSE ),
mUploadWithoutRendering( FALSE ),
- mFirstFrameAfterResume( FALSE ),
- mIsRenderingWindows( false )
+ mFirstFrameAfterResume( FALSE )
{
LOG_EVENT_TRACE;
}
}
+void CombinedUpdateRenderController::DeleteSurface( Dali::RenderSurfaceInterface* surface )
+{
+ LOG_EVENT_TRACE;
+
+ if( mUpdateRenderThread )
+ {
+ LOG_EVENT( "Starting to delete the surface, event-thread blocked" );
+
+ // Start replacing the surface.
+ {
+ ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition );
+ mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will delete the surface now
+ mDeletedSurface = surface;
+ mUpdateRenderThreadWaitCondition.Notify( lock );
+ }
+
+ // Wait until the surface has been deleted
+ sem_wait( &mEventThreadSemaphore );
+
+ LOG_EVENT( "Surface deleted, event-thread continuing" );
+ }
+}
+
void CombinedUpdateRenderController::WaitForGraphicsInitialization()
{
LOG_EVENT_TRACE;
AddPerformanceMarker( PerformanceInterface::RENDER_START );
- mIsRenderingWindows = true;
-
// Upload shared resources
mCore.PreRender( renderStatus, mForceClear, mUploadWithoutRendering );
for( auto&& window : windows )
{
- if ( window && !window->IsBeingDeleted() )
- {
- Dali::Integration::Scene scene = window->GetScene();
- Dali::RenderSurfaceInterface* windowSurface = window->GetSurface();
+ Dali::Integration::Scene scene = window->GetScene();
+ Dali::RenderSurfaceInterface* windowSurface = window->GetSurface();
- if ( scene && windowSurface )
- {
- windowSurface->InitializeGraphics();
+ if ( scene && windowSurface )
+ {
+ windowSurface->InitializeGraphics();
- // Render off-screen frame buffers first if any
- mCore.RenderScene( scene, true );
+ // Render off-screen frame buffers first if any
+ mCore.RenderScene( scene, true );
- // Switch to the EGL context of the surface
- windowSurface->PreRender( surfaceResized ); // Switch GL context
+ // Switch to the EGL context of the surface
+ windowSurface->PreRender( surfaceResized ); // Switch GL context
- // Render the surface
- mCore.RenderScene( scene, false );
+ // Render the surface
+ mCore.RenderScene( scene, false );
- windowSurface->PostRender( false, false, surfaceResized ); // Swap Buffer
- }
+ windowSurface->PostRender( false, false, surfaceResized ); // Swap Buffer
}
}
}
mCore.PostRender( mUploadWithoutRendering );
- mIsRenderingWindows = false;
+ //////////////////////////////
+ // DELETE SURFACE
+ //////////////////////////////
+
+ Dali::RenderSurfaceInterface* deletedSurface = ShouldSurfaceBeDeleted();
+ if( DALI_UNLIKELY( deletedSurface ) )
+ {
+ LOG_UPDATE_RENDER_TRACE_FMT( "Deleting Surface" );
+
+ deletedSurface->DestroySurface();
+
+ SurfaceDeleted();
+ }
AddPerformanceMarker( PerformanceInterface::RENDER_END );
}
}
- // Inform core of context destruction & shutdown EGL
+ // Inform core of context destruction
mCore.ContextDestroyed();
currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
if( currentSurface )
currentSurface = nullptr;
}
+ // Shutdown EGL
+ eglInterface->TerminateGles();
+
LOG_UPDATE_RENDER( "THREAD DESTROYED" );
// Uninstall the logging function
( mUpdateRenderThreadCanSleep && ! updateRequired && ! mPendingRequestUpdate ) ) && // Ensure we wait if we're supposed to be sleeping AND do not require another update
! mDestroyUpdateRenderThread && // Ensure we don't wait if the update-render-thread is supposed to be destroyed
! mNewSurface && // Ensure we don't wait if we need to replace the surface
+ ! mDeletedSurface && // Ensure we don't wait if we need to delete the surface
! mSurfaceResized ) // Ensure we don't wait if we need to resize the surface
{
LOG_UPDATE_RENDER( "WAIT: mUpdateRenderRunCount: %d", mUpdateRenderRunCount );
LOG_UPDATE_RENDER( " mUpdateRenderThreadCanSleep: %d, updateRequired: %d, mPendingRequestUpdate: %d", mUpdateRenderThreadCanSleep, updateRequired, mPendingRequestUpdate );
LOG_UPDATE_RENDER( " mDestroyUpdateRenderThread: %d", mDestroyUpdateRenderThread );
LOG_UPDATE_RENDER( " mNewSurface: %d", mNewSurface );
+ LOG_UPDATE_RENDER( " mDeletedSurface: %d", mDeletedSurface );
LOG_UPDATE_RENDER( " mSurfaceResized: %d", mSurfaceResized );
// Reset the time when the thread is waiting, so the sleep-until time for
LOG_COUNTER_UPDATE_RENDER( "mUpdateRenderThreadCanSleep: %d, updateRequired: %d, mPendingRequestUpdate: %d", mUpdateRenderThreadCanSleep, updateRequired, mPendingRequestUpdate );
LOG_COUNTER_UPDATE_RENDER( "mDestroyUpdateRenderThread: %d", mDestroyUpdateRenderThread );
LOG_COUNTER_UPDATE_RENDER( "mNewSurface: %d", mNewSurface );
+ LOG_COUNTER_UPDATE_RENDER( "mDeletedSurface: %d", mDeletedSurface );
LOG_COUNTER_UPDATE_RENDER( "mSurfaceResized: %d", mSurfaceResized );
mUseElapsedTimeAfterWait = FALSE;
sem_post( &mEventThreadSemaphore );
}
+Dali::RenderSurfaceInterface* CombinedUpdateRenderController::ShouldSurfaceBeDeleted()
+{
+ ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition );
+
+ Dali::RenderSurfaceInterface* deletedSurface = mDeletedSurface;
+ mDeletedSurface = NULL;
+
+ return deletedSurface;
+}
+
+void CombinedUpdateRenderController::SurfaceDeleted()
+{
+ // Just increment the semaphore
+ sem_post( &mEventThreadSemaphore );
+}
+
bool CombinedUpdateRenderController::ShouldSurfaceBeResized()
{
ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition );
ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition );
while( mPostRendering &&
! mNewSurface && // We should NOT wait if we're replacing the surface
+ ! mDeletedSurface && // We should NOT wait if we're deleting the surface
! mDestroyUpdateRenderThread )
{
mUpdateRenderThreadWaitCondition.Wait( lock );
virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
/**
+ * @copydoc ThreadControllerInterface::DeleteSurface()
+ */
+ virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface );
+
+ /**
* @copydoc ThreadControllerInterface::ResizeSurface()
*/
virtual void ResizeSurface();
*/
virtual void AddSurface( Dali::RenderSurfaceInterface* surface );
- /**
- * @copydoc ThreadControllerInterface::IsRenderingWindows()
- */
- bool IsRenderingWindows() const override { return mIsRenderingWindows; }
-
private:
// Undefined copy constructor.
void SurfaceReplaced();
/**
+ * Checks to see if the surface needs to be deleted.
+ * This will lock the mutex in mUpdateRenderThreadWaitCondition.
+ *
+ * @return Pointer to the deleted surface, nullptr otherwise
+ */
+ Dali::RenderSurfaceInterface* ShouldSurfaceBeDeleted();
+
+ /**
+ * Called by the Update/Render thread after a surface has been deleted.
+ *
+ * This will lock the mutex in mEventThreadWaitCondition
+ */
+ void SurfaceDeleted();
+
+ /**
* Checks to see if the surface needs to be resized.
* This will lock the mutex in mUpdateRenderThreadWaitCondition.
*
volatile unsigned int mUseElapsedTimeAfterWait; ///< Whether we should use the elapsed time after waiting (set by the event-thread, read by the update-render-thread).
Dali::RenderSurfaceInterface* volatile mNewSurface; ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread).
+ Dali::RenderSurfaceInterface* volatile mDeletedSurface; ///< Will be set to the deleted surface if requested (set by the event-thread, read & cleared by the update-render thread).
volatile unsigned int mPostRendering; ///< Whether post-rendering is taking place (set by the event & render threads, read by the render-thread).
volatile unsigned int mSurfaceResized; ///< Will be set to resize the surface (set by the event-thread, read & cleared by the update-render thread).
volatile unsigned int mUploadWithoutRendering; ///< Will be set to upload the resource only (with no rendering)
volatile unsigned int mFirstFrameAfterResume; ///< Will be set to check the first frame after resume (for log)
-
- std::atomic<bool> mIsRenderingWindows; ///< This is set only from the render thread and read only from the event thread
};
} // namespace Adaptor
virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface ) = 0;
/**
+ * Deletes the surface.
+ * @param[in] surface The surface to be deleted
+ */
+ virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface ) = 0;
+
+ /**
* Resize the surface.
*/
virtual void ResizeSurface() = 0;
*/
virtual void AddSurface( Dali::RenderSurfaceInterface* surface ) = 0;
- /**
- * @copydoc Dali::Adaptor::IsRenderingWindows()
- */
- virtual bool IsRenderingWindows() const = 0;
-
protected:
/**
};
/**
+ * Destructor
+ */
+ virtual ~GraphicsInterface() {}
+
+ /**
* Initialize the graphics interface
* @param[in] environmentOptions The environment options.
*/
return mStencilBufferRequired;
};
-protected:
- /**
- * Virtual protected destructor - no deletion through this interface
- */
- virtual ~GraphicsInterface() {};
-
protected:
void EglImplementation::DestroyContext( EGLContext& eglContext )
{
- DALI_ASSERT_ALWAYS( mEglContext && "no EGL context" );
-
- eglDestroyContext( mEglDisplay, eglContext );
- eglContext = 0;
+ if( eglContext )
+ {
+ eglDestroyContext( mEglDisplay, eglContext );
+ eglContext = 0;
+ }
}
void EglImplementation::DestroySurface( EGLSurface& eglSurface )
namespace Adaptor
{
-#if _GLIBCXX_USE_CXX11_ABI
-const char * const FeedbackPluginProxy::DEFAULT_OBJECT_NAME( "libdali-feedback-plugin.so" );
-#else
-const char * const FeedbackPluginProxy::DEFAULT_OBJECT_NAME( "libdali-feedback-plugin-cxx03.so" );
-#endif
+const char * const FeedbackPluginProxy::DEFAULT_OBJECT_NAME( "libdali2-feedback-plugin.so" );
FeedbackPluginProxy::FeedbackPluginProxy( const std::string& sharedObjectName )
: mInitializeAttempted( false ),
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
return success;
}
-bool NativeImageSourceAndroid::EncodeToFile(const std::string& filename) const
-{
- std::vector< unsigned char > pixbuf;
- unsigned int width(0), height(0);
- Pixel::Format pixelFormat;
-
- if( GetPixels( pixbuf, width, height, pixelFormat ) )
- {
- return Dali::EncodeToFile( &pixbuf[0], filename, pixelFormat, width, height );
- }
- return false;
-}
-
void NativeImageSourceAndroid::SetSource( Any source )
{
if( mPixmap )
#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
/**
- * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
- */
- bool EncodeToFile(const std::string& filename) const override;
-
- /**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
*/
void SetSource( Any source ) override;
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;
{
-static const char * DEFAULT_OBJECT_NAME( "libdali-image-loader-plugin.so" );
+static const char * DEFAULT_OBJECT_NAME( "libdali2-image-loader-plugin.so" );
static bool mInitializeAttempted = false;
static void* mLibHandle = NULL;
#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_IMPL_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/native-image-source.h>
+#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
namespace Dali
{
{
public:
+ static constexpr uint32_t DEFAULT_QUALITY = 100;
+
/**
* Create a new NativeImageSource internally.
* Depending on hardware the width and height may have to be a power of two.
virtual bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const = 0;
/**
- * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
- */
- virtual bool EncodeToFile(const std::string& filename) const = 0;
-
- /**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
*/
virtual void SetSource( Any source ) = 0;
*/
virtual bool ReleaseBuffer() = 0;
+ /**
+ * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
+ */
+ inline bool EncodeToFile( const std::string& filename ) const
+ {
+ return EncodeToFile( filename, DEFAULT_QUALITY );
+ }
+
+ /**
+ * @brief Converts the current pixel contents to either a JPEG or PNG format
+ * and write that to the filesystem.
+ *
+ * @param[in] filename Identify the filesystem location at which to write the encoded image.
+ * The extension determines the encoding used.
+ * The two valid encoding are (".jpeg"|".jpg") and ".png".
+ * @param[in] quality The quality of encoded jpeg image
+ * @return @c true if the pixels were written, and @c false otherwise
+ */
+ inline bool EncodeToFile( const std::string& filename, const uint32_t quality ) const
+ {
+ std::vector< uint8_t > pixbuf;
+ uint32_t width( 0 ), height( 0 );
+ Pixel::Format pixelFormat;
+
+ if( GetPixels( pixbuf, width, height, pixelFormat ) )
+ {
+ return Dali::EncodeToFile( &pixbuf[0], filename, pixelFormat, width, height, quality );
+ }
+ return false;
+ }
+
public:
inline static Internal::Adaptor::NativeImageSource& GetImplementation( Dali::NativeImageSource& image ) { return *image.mImpl; }
};
virtual void SetSize( uint32_t width, uint32_t height ) = 0;
/**
+ * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
+ */
+ virtual void IgnoreSourceImage() = 0;
+
+ /**
* destructor
*/
virtual ~NativeImageSourceQueue() = default;
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
-// Allow this to be encoded and saved:
-#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
-
namespace Dali
{
{
cOffset = c*4;
offset = cOffset + r*stride;
- *(bufptr+cOffset) = ptr[offset];
- *(bufptr+cOffset+1) = ptr[offset+3];
- *(bufptr+cOffset+2) = ptr[offset+2];
- *(bufptr+cOffset+3) = ptr[offset+1];
+ *(bufptr+cOffset) = ptr[offset+2];
+ *(bufptr+cOffset+1) = ptr[offset+1];
+ *(bufptr+cOffset+2) = ptr[offset];
+ *(bufptr+cOffset+3) = ptr[offset+3];
}
}
break;
return false;
}
-bool NativeImageSourceTizen::EncodeToFile(const std::string& filename) const
-{
- std::vector< unsigned char > pixbuf;
- unsigned int width(0), height(0);
- Pixel::Format pixelFormat;
-
- if(GetPixels(pixbuf, width, height, pixelFormat))
- {
- return Dali::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height);
- }
- return false;
-}
-
void NativeImageSourceTizen::SetSource( Any source )
{
Dali::Mutex::ScopedLock lock( mMutex );
#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_IMPL_TIZEN_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @copydoc Dali::NativeImageSource::GetPixels()
*/
- bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
-
- /**
- * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
- */
- bool EncodeToFile(const std::string& filename) const override;
+ bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
/**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
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;
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
namespace Dali
return success;
}
-bool NativeImageSourceX::EncodeToFile(const std::string& filename) const
-{
- std::vector< unsigned char > pixbuf;
- unsigned int width(0), height(0);
- Pixel::Format pixelFormat;
-
- if(GetPixels(pixbuf, width, height, pixelFormat))
- {
- return Dali::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height);
- }
- return false;
-}
-
void NativeImageSourceX::SetSource( Any source )
{
mPixmap = GetPixmapFromAny( source );
#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
/**
- * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
- */
- bool EncodeToFile(const std::string& filename) const override;
-
- /**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
*/
void SetSource( Any source ) 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;
#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/window-system/windows/platform-implement-win.h>
-#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
namespace Dali
return success;
}
-bool NativeImageSourceWin::EncodeToFile(const std::string& filename) const
-{
- std::vector< uint8_t > pixbuf;
- uint32_t width(0), height(0);
- Pixel::Format pixelFormat;
-
- if(GetPixels(pixbuf, width, height, pixelFormat))
- {
- return Dali::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height);
- }
- return false;
-}
-
void NativeImageSourceWin::SetSource( Any source )
{
mPixmap = GetPixmapFromAny( source );
#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
bool GetPixels(std::vector<unsigned char> &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const override;
/**
- * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
- */
- bool EncodeToFile(const std::string& filename) const override;
-
- /**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
*/
void SetSource( Any source ) override;
#endif
// Path for loading extension keys
-#if _GLIBCXX_USE_CXX11_ABI
-const char* KEY_EXTENSION_PLUGIN_SO( "libdali-key-extension.so" );
-#else
-const char* KEY_EXTENSION_PLUGIN_SO( "libdali-key-extension-cxx03.so" );
-#endif
+const char* KEY_EXTENSION_PLUGIN_SO( "libdali2-key-extension.so" );
class KeyMap
{
if( mHandle == NULL )
{
- DALI_LOG_INFO( gKeyExtensionLogFilter, Debug::General, "Failed to get handle from libdali-key-extension.so\n" );
+ DALI_LOG_INFO( gKeyExtensionLogFilter, Debug::General, "Failed to get handle from libdali2-key-extension.so\n" );
return;
}
{
// All the information about this actor
std::ostringstream msg;
- msg << "{ " << Quote( "Name" ) << " : " << Quote( actor.GetName() ) << ", " << Quote( "level" ) << " : " << level << ", " << Quote( "id" ) << " : " << actor.GetId() << ", " << Quote( "IsVisible" )
- << " : " << actor.IsVisible() << ", " << Quote( "IsSensitive" ) << " : " << actor.IsSensitive();
+ msg << "{ " << Quote( "Name" ) << " : " << Quote( actor.GetProperty< std::string >( Actor::Property::NAME ) ) << ", " << Quote( "level" ) << " : " << level << ", " << Quote( "id" ) << " : " << actor.GetId() << ", " << Quote( "IsVisible" )
+ << " : " << actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) << ", " << Quote( "IsSensitive" ) << " : " << actor.GetProperty< bool >( Actor::Property::SENSITIVE );
msg << ", " << Quote( "properties" ) << ": [ ";
// INTERNAL INCLUDES
#include <dali/integration-api/adaptor-framework/adaptor.h>
+#include <dali/devel-api/adaptor-framework/native-image-source-devel.h>
namespace
{
{
Capture::Capture()
-: mTimer(),
+: mQuality( DEFAULT_QUALITY ),
+ mTimer(),
mPath(),
mNativeImageSourcePtr( NULL ),
mFileSave( false )
}
Capture::Capture( Dali::CameraActor cameraActor )
-: mCameraActor( cameraActor ),
+: mQuality( DEFAULT_QUALITY ),
+ mCameraActor( cameraActor ),
mTimer(),
mPath(),
mNativeImageSourcePtr( NULL ),
return pWorker;
}
+void Capture::Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor, const uint32_t quality )
+{
+ mQuality = quality;
+ Start( source, size, path, clearColor );
+}
+
void Capture::Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor )
{
DALI_ASSERT_ALWAYS(path.size() > 4 && "Path is invalid.");
Dali::NativeImageSourcePtr Capture::GetNativeImageSource() const
{
- DALI_ASSERT_ALWAYS( mNativeImageSourcePtr && "mNativeImageSourcePtr is NULL.");
-
return mNativeImageSourcePtr;
}
void Capture::DeleteNativeImageSource()
{
- DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSource is NULL.");
-
mNativeImageSourcePtr.Reset();
}
if( !mCameraActor )
{
mCameraActor = Dali::CameraActor::New( stageSize );
- mCameraActor.SetParentOrigin( ParentOrigin::CENTER );
- mCameraActor.SetAnchorPoint( AnchorPoint::CENTER );
+ mCameraActor.SetProperty( Dali::Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mCameraActor.SetProperty( Dali::Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
}
stage.Add( mCameraActor );
{
DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSourcePtr is NULL");
- return mNativeImageSourcePtr->EncodeToFile( mPath );
+ return Dali::DevelNativeImageSource::EncodeToFile( *mNativeImageSourcePtr, mPath, mQuality );
}
} // End of namespace Adaptor
class Capture : public BaseObject, public ConnectionTracker
{
public:
+
+ static constexpr uint32_t DEFAULT_QUALITY = 100;
+
/**
* @brief Constructor.
*/
/**
* @copydoc Dali::Capture::Start
*/
+ void Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor, const uint32_t quality );
+
+ /**
+ * @copydoc Dali::Capture::Start
+ */
void Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor );
/**
Capture& operator=( const Capture& rhs );
private:
+ uint32_t mQuality;
Dali::Texture mNativeTexture;
Dali::FrameBuffer mFrameBuffer;
Dali::RenderTask mRenderTask;
namespace // unnamed namespace
{
-const char* COLOR_CONTROLLER_PLUGIN_SO( "libdali-color-controller-plugin.so" );
+const char* COLOR_CONTROLLER_PLUGIN_SO( "libdali2-color-controller-plugin.so" );
}
Dali::ColorController ColorController::Get()
mThreadControllerInterface->ReplaceSurface( newSurface );
}
+void ThreadController::DeleteSurface( Dali::RenderSurfaceInterface* surface )
+{
+ mThreadControllerInterface->DeleteSurface( surface );
+}
+
void ThreadController::ResizeSurface()
{
mThreadControllerInterface->ResizeSurface();
mThreadControllerInterface->AddSurface( newSurface );
}
-bool ThreadController::IsRenderingWindows() const
-{
- return mThreadControllerInterface->IsRenderingWindows();
-}
-
} // namespace Adaptor
} // namespace Internal
void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
/**
+ * Deletes the surface.
+ * @param surface The surface to be deleted
+ */
+ void DeleteSurface( Dali::RenderSurfaceInterface* surface );
+
+ /**
* Resize the surface.
*/
void ResizeSurface();
*/
void AddSurface( Dali::RenderSurfaceInterface* surface );
- /**
- * @copydoc Dali::Adaptor::IsRenderingWindows()
- */
- bool IsRenderingWindows() const;
-
private:
// Undefined copy constructor.
return mPlugin.GetMarkerInfo( marker, startFrame, endFrame );
}
+void VectorAnimationRenderer::IgnoreRenderedFrame()
+{
+ mPlugin.IgnoreRenderedFrame();
+}
+
Dali::VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
{
return mPlugin.UploadCompletedSignal();
bool GetMarkerInfo( const std::string& marker, uint32_t& startFrame, uint32_t& endFrame ) const;
/**
+ * @copydoc Dali::VectorAnimationRenderer::IgnoreRenderedFrame()
+ */
+ void IgnoreRenderedFrame();
+
+ /**
* @copydoc Dali::VectorAnimationRenderer::UploadCompletedSignal()
*/
Dali::VectorAnimationRenderer::UploadCompletedSignalType& UploadCompletedSignal();
{
// The default plugin name
-const char* DEFAULT_OBJECT_NAME( "libdali-vector-animation-renderer-plugin.so" );
+const char* DEFAULT_OBJECT_NAME( "libdali2-vector-animation-renderer-plugin.so" );
}
return false;
}
+void VectorAnimationRendererPluginProxy::IgnoreRenderedFrame()
+{
+ if( mPlugin )
+ {
+ mPlugin->IgnoreRenderedFrame();
+ }
+}
+
VectorAnimationRendererPlugin::UploadCompletedSignalType& VectorAnimationRendererPluginProxy::UploadCompletedSignal()
{
if( mPlugin )
bool GetMarkerInfo( const std::string& marker, uint32_t& startFrame, uint32_t& endFrame ) const;
/**
+ * @copydoc Dali::VectorAnimationRendererPlugin::IgnoreRenderedFrame()
+ */
+ void IgnoreRenderedFrame();
+
+ /**
* @copydoc Dali::VectorAnimationRendererPlugin::UploadCompletedSignal()
*/
VectorAnimationRendererPlugin::UploadCompletedSignalType& UploadCompletedSignal();
namespace // unnamed namespace
{
-#if _GLIBCXX_USE_CXX11_ABI
-const char* VIDEO_PLUGIN_SO( "libdali-video-player-plugin.so" );
-#else
-const char* VIDEO_PLUGIN_SO( "libdali-video-player-plugin-cxx03.so" );
-#endif
+const char* VIDEO_PLUGIN_SO( "libdali2-video-player-plugin.so" );
Dali::BaseHandle Create()
{
namespace // unnamed namespace
{
-constexpr char const * const kPluginFullNamePrefix = "libdali-web-engine-";
+constexpr char const * const kPluginFullNamePrefix = "libdali2-web-engine-";
constexpr char const * const kPluginFullNamePostfix = "-plugin.so";
-constexpr char const * const kPluginFullNameDefault = "libdali-web-engine-plugin.so";
+constexpr char const * const kPluginFullNameDefault = "libdali2-web-engine-plugin.so";
// Note: Dali WebView policy does not allow to use multiple web engines in an application.
// So once pluginName is set to non-empty string, it will not change.
Window::~Window()
{
- mIsBeingDeleted = true;
-
- while ( mAdaptor && mAdaptor->IsRenderingWindows() )
- {
- std::this_thread::yield(); // to allow other threads to run
- }
-
if ( mEventHandler )
{
mEventHandler->RemoveObserver( *this );
SetAvailableAnlges( mAvailableAngles );
}
+int32_t Window::GetNativeId() const
+{
+ return mWindowBase->GetNativeWindowId();
+}
+
} // Adaptor
} // Internal
*/
bool IsVisible() const override;
+ /**
+ * @copydoc Dali::DevelWindow::GetNativeId()
+ */
+ int32_t GetNativeId() const;
+
private:
/**
{
delete mRotationTrigger;
}
-
- if ( mEGLSurface )
- {
- DestroySurface();
- }
}
void WindowRenderSurface::Initialize( Any surface )
void WindowRenderSurface::InitializeGraphics()
{
-
mGraphics = &mAdaptor->GetGraphicsInterface();
+ DALI_ASSERT_ALWAYS( mGraphics && "Graphics interface is not created" );
+
auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
mEGL = &eglGraphics->GetEglInterface();
DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter );
auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
+ if( eglGraphics )
+ {
+ DALI_LOG_RELEASE_INFO("WindowRenderSurface::DestroySurface: WinId (%d)\n", mWindowBase->GetNativeWindowId() );
- DALI_LOG_RELEASE_INFO("WindowRenderSurface::DestroySurface: WinId (%d)\n", mWindowBase->GetNativeWindowId() );
+ Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
- Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
- eglImpl.DestroySurface( mEGLSurface );
+ eglImpl.DestroySurface( mEGLSurface );
+ mEGLSurface = nullptr;
- mWindowBase->DestroyEglWindow();
+ // Destroy context also
+ eglImpl.DestroyContext( mEGLContext );
+ mEGLContext = nullptr;
+
+ mWindowBase->DestroyEglWindow();
+ }
}
bool WindowRenderSurface::ReplaceGraphicsSurface()
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
bool NativeImageSource::EncodeToFile(const std::string& filename) const
{
- return mImpl->EncodeToFile(filename);
+ return mImpl->EncodeToFile( filename );
}
void NativeImageSource::SetSource( Any source )
return *this;
}
+void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality )
+{
+ GetImpl( *this ).Start( source, size, path, clearColor, quality );
+}
+
void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor )
{
GetImpl( *this ).Start( source, size, path, clearColor );
/**
* @brief Start capture and save the image as a file.
*
+ * @SINCE_1_9.12
+ *
+ * @param[in] source source actor to be used for capture.
+ * @param[in] size captured size.
+ * @param[in] path image file path to be saved as a file.
+ * @param[in] clearColor background color of captured scene
+ * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100]
+ */
+ void Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality );
+
+ /**
+ * @brief Start capture and save the image as a file.
+ *
* @SINCE_1_3_4
*
* @param[in] source source actor to be used for capture.
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 9;
-const unsigned int ADAPTOR_MICRO_VERSION = 10;
+const unsigned int ADAPTOR_MICRO_VERSION = 13;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali2-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.9.10
+Version: 1.9.13
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT