projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dali_1.3.5] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
visuals
/
visual-base-impl.cpp
diff --git
a/dali-toolkit/internal/visuals/visual-base-impl.cpp
b/dali-toolkit/internal/visuals/visual-base-impl.cpp
index
c829e8f
..
e4f12c8
100644
(file)
--- a/
dali-toolkit/internal/visuals/visual-base-impl.cpp
+++ b/
dali-toolkit/internal/visuals/visual-base-impl.cpp
@@
-35,6
+35,8
@@
namespace
#if defined(DEBUG_ENABLED)
Debug::Filter* gVisualBaseLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_VISUAL_BASE" );
#endif
#if defined(DEBUG_ENABLED)
Debug::Filter* gVisualBaseLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_VISUAL_BASE" );
#endif
+
+const char * const PRE_MULTIPLIED_ALPHA_PROPERTY( "preMultipliedAlpha" );
}
namespace Dali
}
namespace Dali
@@
-221,6
+223,11
@@
void Visual::Base::GetNaturalSize( Vector2& naturalSize )
naturalSize = Vector2::ZERO;
}
naturalSize = Vector2::ZERO;
}
+void Visual::Base::DoAction( const Property::Index actionId, const Property::Value attributes )
+{
+ OnDoAction( actionId, attributes );
+}
+
void Visual::Base::SetDepthIndex( int index )
{
mImpl->mDepthIndex = index;
void Visual::Base::SetDepthIndex( int index )
{
mImpl->mDepthIndex = index;
@@
-301,9
+308,9
@@
void Visual::Base::CreateInstancePropertyMap( Property::Map& map ) const
}
}
-void Visual::Base::EnablePreMultipliedAlpha( bool preMultipled )
+void Visual::Base::EnablePreMultipliedAlpha( bool preMultipl
i
ed )
{
{
- if( preMultipled )
+ if( preMultipl
i
ed )
{
mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
}
{
mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
}
@@
-314,7
+321,8
@@
void Visual::Base::EnablePreMultipliedAlpha( bool preMultipled )
if( mImpl->mRenderer )
{
if( mImpl->mRenderer )
{
- mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, preMultipled);
+ mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, preMultiplied);
+ mImpl->mRenderer.RegisterProperty( PRE_MULTIPLIED_ALPHA_PROPERTY, static_cast<float>( preMultiplied ) );
}
}
}
}
@@
-334,6
+342,11
@@
bool Visual::Base::IsOnStage() const
return mImpl->mFlags & Impl::IS_ON_STAGE;
}
return mImpl->mFlags & Impl::IS_ON_STAGE;
}
+void Visual::Base::OnDoAction( const Property::Index actionId, const Property::Value& attributes )
+{
+ // May be overriden by derived class
+}
+
void Visual::Base::RegisterMixColor()
{
// Only register if not already registered.
void Visual::Base::RegisterMixColor()
{
// Only register if not already registered.
@@
-366,7
+379,7
@@
void Visual::Base::RegisterMixColor()
{
preMultipliedAlpha = 1.0f;
}
{
preMultipliedAlpha = 1.0f;
}
- mImpl->mRenderer.RegisterProperty(
"preMultipliedAlpha"
, preMultipliedAlpha );
+ mImpl->mRenderer.RegisterProperty(
PRE_MULTIPLIED_ALPHA_PROPERTY
, preMultipliedAlpha );
}
void Visual::Base::SetMixColor( const Vector4& color )
}
void Visual::Base::SetMixColor( const Vector4& color )
@@
-411,25
+424,28
@@
void Visual::Base::RemoveResourceObserver( Visual::ResourceObserver& observer )
mImpl->mResourceObserver = NULL;
}
mImpl->mResourceObserver = NULL;
}
-void Visual::Base::ResourceReady()
+void Visual::Base::ResourceReady(
Toolkit::Visual::ResourceStatus resourceStatus
)
{
{
- if( mImpl->mResource
Ready
)
+ if( mImpl->mResource
Status != resourceStatus
)
{
{
- // only inform the observer the first time the resource is ready
- return;
- }
- mImpl->mResourceReady = true;
+ mImpl->mResourceStatus = resourceStatus;
- if( mImpl->mResourceObserver )
- {
- // observer is currently a control impl
- mImpl->mResourceObserver->ResourceReady( *this );
+ if( mImpl->mResourceObserver )
+ {
+ // observer is currently a control impl
+ mImpl->mResourceObserver->ResourceReady( *this );
+ }
}
}
bool Visual::Base::IsResourceReady() const
{
}
}
bool Visual::Base::IsResourceReady() const
{
- return mImpl->mResourceReady;
+ return ( mImpl->mResourceStatus == Toolkit::Visual::ResourceStatus::READY );
+}
+
+Toolkit::Visual::ResourceStatus Visual::Base::GetResourceStatus() const
+{
+ return mImpl->mResourceStatus;
}
Renderer Visual::Base::GetRenderer()
}
Renderer Visual::Base::GetRenderer()