Remove non-touch related deprecated APIs
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / texture-manager-impl.cpp
index 612433d..5c694d0 100644 (file)
@@ -25,7 +25,6 @@
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/devel-api/common/hash.h>
-#include <dali/devel-api/images/texture-set-image.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
 
@@ -208,7 +207,7 @@ TextureSet TextureManager::LoadTexture(
     {
       Devel::PixelBuffer pixelBuffer = LoadImageFromFile( url.GetUrl(), desiredSize, fittingMode, samplingMode,
                                        orientationCorrection  );
-      if( maskInfo )
+      if( maskInfo && maskInfo->mAlphaMaskUrl.IsValid() )
       {
         Devel::PixelBuffer maskPixelBuffer = LoadImageFromFile( maskInfo->mAlphaMaskUrl.GetUrl(), ImageDimensions(),
                                              FittingMode::SCALE_TO_FILL, SamplingMode::NO_FILTER, true  );
@@ -226,7 +225,6 @@ TextureSet TextureManager::LoadTexture(
     if( !data )
     {
       // use broken image
-      textureSet = TextureSet::New();
       Devel::PixelBuffer pixelBuffer = LoadImageFromFile( mBrokenImageUrl );
       if( pixelBuffer )
       {
@@ -271,7 +269,7 @@ TextureSet TextureManager::LoadTexture(
     if( !textureSet ) // big image, no atlasing or atlasing failed
     {
       atlasingStatus = false;
-      if( !maskInfo )
+      if( !maskInfo || !maskInfo->mAlphaMaskUrl.IsValid() )
       {
         textureId = RequestLoad( url, desiredSize, fittingMode, samplingMode, TextureManager::NO_ATLAS,
                                  textureObserver, orientationCorrection, reloadPolicy, preMultiplyOnLoad );