[4.0] Added automatic premultiplication of image visual images
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-image / fixed-image-cache.cpp
old mode 100644 (file)
new mode 100755 (executable)
index f1b3411..b1713d2
@@ -113,6 +113,7 @@ void FixedImageCache::LoadBatch()
     AtlasUploadObserver* atlasObserver = nullptr;
     ImageAtlasManagerPtr imageAtlasManager = nullptr;
     Vector4 textureRect;
+    auto preMultiply = TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
 
     mTextureManager.LoadTexture(
       url, ImageDimensions(), FittingMode::SCALE_TO_FILL,
@@ -121,7 +122,7 @@ void FixedImageCache::LoadBatch()
       atlasingStatus, loadingStatus, Dali::WrapMode::Type::DEFAULT,
       Dali::WrapMode::Type::DEFAULT, this,
       atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED,
-      TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY );
+      preMultiply );
 
     if( loadingStatus == false )  // not loading, means it's already ready.
     {
@@ -165,7 +166,8 @@ void FixedImageCache::UploadComplete(
   int32_t        textureId,
   TextureSet     textureSet,
   bool           useAtlasing,
-  const Vector4& atlasRect )
+  const Vector4& atlasRect,
+  bool           preMultiplied)
 {
   bool frontFrameReady = IsFrontReady();