return GetImplementation(*this).Rotate( angle );
}
+bool PixelBuffer::IsAlphaPreMultiplied() const
+{
+ return GetImplementation(*this).IsAlphaPreMultiplied();
+}
+
} // namespace Devel
} // namespace Dali
*/
bool Rotate( Degree angle );
+ /**
+ * @brief Returns pixel-buffer is premultiplied or not.
+ * @return true if alpha is pre-multiplied.
+ */
+ bool IsAlphaPreMultiplied() const;
+
public:
/**
* @param[in] window The window instance
* @return A valid handle to a RenderTaskList
*/
-Dali::RenderTaskList GetRenderTaskList( Window window );
+DALI_ADAPTOR_API Dali::RenderTaskList GetRenderTaskList( Window window );
/**
* @brief Retrieve the window that the given actor is added to.
class RenderSurfaceInterface;
+using WindowContainer = std::vector<Window>;
+
namespace Integration
{
class SceneHolder;
public:
typedef Signal< void (Adaptor&) > AdaptorSignalType; ///< Generic Type for adaptor signals
+ typedef Signal< void (Window&) > WindowCreatedSignalType; ///< Window created signal type
public:
/**
*/
void UnregisterProcessor( Integration::Processor& processor );
+ /**
+ * @brief Get the list of windows created.
+ * @return The list of windows
+ */
+ Dali::WindowContainer GetWindows() const;
+
public: // Signals
/**
*/
AdaptorSignalType& LanguageChangedSignal();
+ /**
+ * @brief This signal is emitted when a new window is created
+ *
+ * @return The signal to connect to
+ */
+ WindowCreatedSignalType& WindowCreatedSignal();
+
private:
// Undefined
defaultWindow->SetAdaptor( Get() );
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( ( &defaultWindow )->Get() ) );
+ if ( window )
+ {
+ mWindowCreatedSignal.Emit( window );
+ }
+
const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
if( 0u < timeInterval )
{
// Add the new Window to the container - the order is not important
mWindows.push_back( SceneHolderPtr( &windowImpl ) );
+
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( &windowImpl ) );
+ if ( window )
+ {
+ mWindowCreatedSignal.Emit( window );
+ }
+
return true;
}
return nullptr;
}
+Dali::WindowContainer Adaptor::GetWindows() const
+{
+ Dali::WindowContainer windows;
+
+ for ( auto iter = mWindows.begin(); iter != mWindows.end(); ++iter )
+ {
+ // Downcast to Dali::Window
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( iter->Get() ) );
+ if ( window )
+ {
+ windows.push_back( window );
+ }
+ }
+
+ return windows;
+}
+
Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions)
: mResizedSignal(),
mLanguageChangedSignal(),
+ mWindowCreatedSignal(),
mAdaptor( adaptor ),
mState( READY ),
mCore( nullptr ),
{
public:
- typedef Dali::Adaptor::AdaptorSignalType AdaptorSignalType;
+ using AdaptorSignalType = Dali::Adaptor::AdaptorSignalType;
+ using WindowCreatedSignalType = Dali::Adaptor::WindowCreatedSignalType;
- typedef Uint16Pair SurfaceSize; ///< Surface size type
+ using SurfaceSize = Uint16Pair; ///< Surface size type
/**
* Creates a New Adaptor
*/
Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor );
+ /**
+ * @copydoc Dali::Adaptor::GetWindows()
+ */
+ Dali::WindowContainer GetWindows() const;
+
public:
/**
return mLanguageChangedSignal;
}
+ /**
+ * @copydoc Dali::Adaptor::WindowCreatedSignal
+ */
+ WindowCreatedSignalType& WindowCreatedSignal()
+ {
+ return mWindowCreatedSignal;
+ }
+
public: // From Dali::Internal::Adaptor::CoreEventInterface
/**
AdaptorSignalType mResizedSignal; ///< Resized signal.
AdaptorSignalType mLanguageChangedSignal; ///< Language changed signal.
+ WindowCreatedSignalType mWindowCreatedSignal; ///< Window created signal.
Dali::Adaptor& mAdaptor; ///< Reference to public adaptor instance.
State mState; ///< Current state of the adaptor
return mImpl->LanguageChangedSignal();
}
+Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal()
+{
+ return mImpl->WindowCreatedSignal();
+}
+
Dali::RenderSurfaceInterface& Adaptor::GetSurface()
{
return mImpl->GetSurface();
mImpl->UnregisterProcessor( processor );
}
+Dali::WindowContainer Adaptor::GetWindows() const
+{
+ return mImpl->GetWindows();
+}
+
Adaptor::Adaptor()
: mImpl( NULL )
{
}
else
{
- DALI_ASSERT_DEBUG( false == "Inner branch conditions don't match outer branch." );
+ DALI_ASSERT_DEBUG( false && "Inner branch conditions don't match outer branch." );
}
}
}
}
else
{
- DALI_ASSERT_DEBUG( false == "Inner branch conditions don't match outer branch." );
+ DALI_ASSERT_DEBUG( 0 == "Inner branch conditions don't match outer branch." );
}
}
else
}
else
{
- DALI_ASSERT_DEBUG( false == "Inner branch conditions don't match outer branch." );
+ DALI_ASSERT_DEBUG( 0 == "Inner branch conditions don't match outer branch." );
}
}
else
mBufferSize( bufferSize ),
mWidth( width ),
mHeight( height ),
- mPixelFormat( pixelFormat )
+ mPixelFormat( pixelFormat ),
+ mPreMultiplied( false )
{
}
pixel += bytesPerPixel;
}
}
+ mPreMultiplied = true;
+}
+
+bool PixelBuffer::IsAlphaPreMultiplied() const
+{
+ return mPreMultiplied;
}
}// namespace Adaptor
*/
bool Rotate( Degree angle );
+ /**
+ * @copydoc Devel::PixelBuffer::IsAlphaPreMultiplied()
+ */
+ bool IsAlphaPreMultiplied() const;
+
private:
/*
* Undefined copy constructor.
unsigned int mWidth; ///< Buffer width in pixels
unsigned int mHeight; ///< Buffer height in pixels
Pixel::Format mPixelFormat; ///< Pixel format
+ bool mPreMultiplied; ///< PreMultiplied
};
} // namespace Adaptor
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 4;
-const unsigned int ADAPTOR_MICRO_VERSION = 22;
+const unsigned int ADAPTOR_MICRO_VERSION = 23;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.4.22
+Version: 1.4.23
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT