+ // Url is already received in constructor
+ for( Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter )
+ {
+ KeyValuePair keyValue = propertyMap.GetKeyValue( iter );
+ if( keyValue.first.type == Property::Key::INDEX )
+ {
+ DoSetProperty( keyValue.first.indexKey, keyValue.second );
+ }
+ else
+ {
+ if( keyValue.first == IMAGE_FITTING_MODE )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::FITTING_MODE, keyValue.second );
+ }
+ else if( keyValue.first == IMAGE_SAMPLING_MODE )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::SAMPLING_MODE, keyValue.second );
+ }
+ else if( keyValue.first == IMAGE_DESIRED_WIDTH )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::DESIRED_WIDTH, keyValue.second );
+ }
+ else if( keyValue.first == IMAGE_DESIRED_HEIGHT )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, keyValue.second );
+ }
+ else if( keyValue.first == PIXEL_AREA_UNIFORM_NAME )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::PIXEL_AREA, keyValue.second );
+ }
+ else if( keyValue.first == IMAGE_WRAP_MODE_U )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::WRAP_MODE_U, keyValue.second );
+ }
+ else if( keyValue.first == IMAGE_WRAP_MODE_V )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::WRAP_MODE_V, keyValue.second );
+ }
+ else if( keyValue.first == SYNCHRONOUS_LOADING )
+ {
+ DoSetProperty( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, keyValue.second );
+ }
+ else if ( keyValue.first == IMAGE_ATLASING )
+ {
+ DoSetProperty( Toolkit::DevelImageVisual::Property::ATLASING, keyValue.second );
+ }
+ else if ( keyValue.first == ALPHA_MASK_URL )
+ {
+ DoSetProperty( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, keyValue.second );
+ }
+ }
+ }
+
+ if( mAlphaMaskUrl.IsValid() )
+ {
+ // Immediately trigger the alpha mask loading (it may just get a cached value)
+ TextureManager& textureManager = mFactoryCache.GetTextureManager();
+ mAlphaMaskId = textureManager.RequestMaskLoad( mAlphaMaskUrl );
+ }
+
+ if( ( mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING ) && mImageUrl.IsValid() )
+ {
+ // if sync loading is required, the loading should start
+ // immediately when new image url is set or the actor is off stage
+ // ( for on-stage actor with image url unchanged, resource loading
+ // is already finished )
+ LoadResourceSynchronously();
+ }
+}
+
+void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& value )
+{
+ switch( index )