if(propertyIndex == Toolkit::SuperBlurView::Property::IMAGE_URL)
{
- value.Get(superBlurViewImpl.mUrl);
-
- PixelData pixels = SyncImageLoader::Load(superBlurViewImpl.mUrl);
-
- if(pixels)
- {
- Texture texture = Texture::New(TextureType::TEXTURE_2D, pixels.GetPixelFormat(), pixels.GetWidth(), pixels.GetHeight());
- texture.Upload(pixels, 0, 0, 0, 0, pixels.GetWidth(), pixels.GetHeight());
-
- superBlurViewImpl.SetTexture(texture);
- }
- else
+ if(DALI_LIKELY(value.Get(superBlurViewImpl.mUrl)))
{
- DALI_LOG_ERROR("Cannot create image from property value\n");
+ PixelData pixels = SyncImageLoader::Load(superBlurViewImpl.mUrl);
+
+ if(pixels)
+ {
+ Texture texture = Texture::New(TextureType::TEXTURE_2D, pixels.GetPixelFormat(), pixels.GetWidth(), pixels.GetHeight());
+ texture.Upload(pixels, 0, 0, 0, 0, pixels.GetWidth(), pixels.GetHeight());
+
+ superBlurViewImpl.SetTexture(texture);
+ }
+ else
+ {
+ DALI_LOG_ERROR("Cannot create image from property value\n");
+ }
}
}
}