- Use unified method for any request.
Change-Id: Ief4b744cd42b9184f83ba0ac0ba3436befd2aa61
Signed-off-by: seungho <sbsh.baek@samsung.com>
{
}
- virtual void UploadComplete( bool loadSuccess, int32_t textureId, TextureSet textureSet,
- bool useAtlasing, const Vector4& atlasRect, bool preMultiplied ) override
+ virtual void LoadComplete( bool loadSuccess, TextureInformation textureInformation ) override
{
- mCompleteType = CompleteType::UPLOAD_COMPLETE;
- mLoaded = loadSuccess;
- mObserverCalled = true;
- mTextureSet = textureSet;
- }
-
- virtual void LoadComplete( bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied ) override
- {
- mCompleteType = CompleteType::LOAD_COMPLETE;
+ if(textureInformation.returnType == TextureUploadObserver::ReturnType::TEXTURE)
+ {
+ mCompleteType = CompleteType::UPLOAD_COMPLETE;
+ }
+ else
+ {
+ mCompleteType = CompleteType::LOAD_COMPLETE;
+ }
mLoaded = loadSuccess;
mObserverCalled = true;
+ mTextureSet = textureInformation.textureSet;
}
CompleteType mCompleteType;
if(gResourceReadySignalCounter == 0)
{
// Queue loading
- // 1. Use cached image, then UploadComplete will be called right after OnResourceReadySignal03.
+ // 1. Use cached image, then LoadComplete will be called right after OnResourceReadySignal03.
gImageView2[ImageView::Property::IMAGE] = gImage_34_RGBA;
// 2. Load a new image
mReadyFlags.push_back(false);
- // Note, if the image is already loaded, then UploadComplete will get called
+ // Note, if the image is already loaded, then LoadComplete will get called
// from within this method. This means it won't yet have a texture id, so we
- // need to account for this inside the UploadComplete method using mRequestingLoad.
+ // need to account for this inside the LoadComplete method using mRequestingLoad.
mRequestingLoad = true;
bool synchronousLoading = false;
}
}
-void FixedImageCache::UploadComplete(
- bool loadSuccess,
- int32_t textureId,
- TextureSet textureSet,
- bool useAtlasing,
- const Vector4& atlasRect,
- bool preMultiplied)
+void FixedImageCache::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
{
bool frontFrameReady = IsFrontReady();
if(!mRequestingLoad)
{
- SetImageFrameReady(textureId);
+ SetImageFrameReady(textureInformation.textureId);
CheckFrontFrame(frontFrameReady);
}
else
{
- // UploadComplete has been called from within RequestLoad. TextureManager must
+ // LoadComplete has been called from within RequestLoad. TextureManager must
// therefore already have the texture cached, so make the texture ready.
// (Use the last texture, as the texture id hasn't been assigned yet)
mReadyFlags.back() = true;
}
}
-void FixedImageCache::LoadComplete(
- bool loadSuccess,
- Devel::PixelBuffer pixelBuffer,
- const VisualUrl& url,
- bool preMultiplied)
-{
- // LoadComplete is called if this TextureUploadObserver requested to load
- // an image that will be returned as a type of PixelBuffer by using a method
- // TextureManager::LoadPixelBuffer.
-}
-
} //namespace Internal
} //namespace Toolkit
} //namespace Dali
\ No newline at end of file
void CheckFrontFrame(bool wasReady);
protected:
- void UploadComplete(
- bool loadSuccess,
- int32_t textureId,
- TextureSet textureSet,
- bool useAtlasing,
- const Vector4& atlasRect,
- bool premultiplied) override;
-
- void LoadComplete(
- bool loadSuccess,
- Devel::PixelBuffer pixelBuffer,
- const VisualUrl& url,
- bool preMultiplied) override;
+ void LoadComplete(bool loadSuccess, TextureInformation textureInformation) override;
private:
std::vector<UrlStore>& mImageUrls;
}
}
-void RollingAnimatedImageCache::UploadComplete(
- bool loadSuccess,
- int32_t textureId,
- TextureSet textureSet,
- bool useAtlasing,
- const Vector4& atlasRect,
- bool preMultiplied)
+void RollingAnimatedImageCache::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
{
- DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "AnimatedImageVisual::UploadComplete(textureId:%d) start\n", textureId);
+ DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "AnimatedImageVisual::LoadComplete(textureId:%d) start\n", textureInformation.textureId);
LOG_CACHE;
bool frontFrameReady = IsFrontReady();
if(!mRequestingLoad)
{
- SetImageFrameReady(textureId);
+ SetImageFrameReady(textureInformation.textureId);
CheckFrontFrame(frontFrameReady);
}
else
{
- // UploadComplete has been called from within RequestLoad. TextureManager must
+ // LoadComplete has been called from within RequestLoad. TextureManager must
// therefore already have the texture cached, so make the texture ready.
// (Use the last texture, as the texture id hasn't been assigned yet)
mQueue.Back().mReady = true;
LOG_CACHE;
}
-void RollingAnimatedImageCache::LoadComplete(
- bool loadSuccess,
- Devel::PixelBuffer pixelBuffer,
- const VisualUrl& url,
- bool preMultiplied)
-{
- // LoadComplete is called if this TextureUploadObserver requested to load
- // an image that will be returned as a type of PixelBuffer by using a method
- // TextureManager::LoadPixelBuffer.
-}
-
} //namespace Internal
} //namespace Toolkit
} //namespace Dali
void CheckFrontFrame(bool wasReady);
protected:
- void UploadComplete(
- bool loadSuccess,
- int32_t textureId,
- TextureSet textureSet,
- bool useAtlasing,
- const Vector4& atlasRect,
- bool preMultiplied) override;
-
- void LoadComplete(
- bool loadSuccess,
- Devel::PixelBuffer pixelBuffer,
- const VisualUrl& url,
- bool preMultiplied) override;
+ void LoadComplete(bool loadSuccess, TextureInformation textureInformation) override;
private:
/**
mQueue.PushBack(imageFrame);
- // Note, if the image is already loaded, then UploadComplete will get called
+ // Note, if the image is already loaded, then LoadComplete will get called
// from within this method. This means it won't yet have a texture id, so we
- // need to account for this inside the UploadComplete method using mRequestingLoad.
+ // need to account for this inside the LoadComplete method using mRequestingLoad.
mRequestingLoad = true;
bool synchronousLoading = false;
}
}
-void RollingImageCache::UploadComplete(
- bool loadSuccess,
- int32_t textureId,
- TextureSet textureSet,
- bool useAtlasing,
- const Vector4& atlasRect,
- bool preMultiplied)
+void RollingImageCache::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
{
- DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "AnimatedImageVisual::UploadComplete(textureId:%d) start\n", textureId);
+ DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "AnimatedImageVisual::LoadComplete(textureId:%d) start\n", textureInformation.textureId);
LOG_CACHE;
bool frontFrameReady = IsFrontReady();
if(!mRequestingLoad)
{
- SetImageFrameReady(textureId);
+ SetImageFrameReady(textureInformation.textureId);
CheckFrontFrame(frontFrameReady);
}
else
{
- // UploadComplete has been called from within RequestLoad. TextureManager must
+ // LoadComplete has been called from within RequestLoad. TextureManager must
// therefore already have the texture cached, so make the texture ready.
// (Use the last texture, as the texture id hasn't been assigned yet)
mQueue.Back().mReady = true;
LOG_CACHE;
}
-void RollingImageCache::LoadComplete(
- bool loadSuccess,
- Devel::PixelBuffer pixelBuffer,
- const VisualUrl& url,
- bool preMultiplied)
-{
- // LoadComplete is called if this TextureUploadObserver requested to load
- // an image that will be returned as a type of PixelBuffer by using a method
- // TextureManager::LoadPixelBuffer.
-}
-
} //namespace Internal
} //namespace Toolkit
} //namespace Dali
void CheckFrontFrame(bool wasReady);
protected:
- void UploadComplete(
- bool loadSuccess,
- int32_t textureId,
- TextureSet textureSet,
- bool useAtlasing,
- const Vector4& atlasRect,
- bool preMultiplied) override;
-
- void LoadComplete(
- bool loadSuccess,
- Devel::PixelBuffer pixelBuffer,
- const VisualUrl& url,
- bool preMultiplied) override;
+ void LoadComplete(bool loadSuccess, TextureInformation textureInformation) override;
private:
/**
}
// From Texture Manager
-void ImageVisual::UploadComplete(bool loadingSuccess, int32_t textureId, TextureSet textureSet, bool usingAtlas, const Vector4& atlasRectangle, bool preMultiplied)
+void ImageVisual::LoadComplete(bool loadingSuccess, TextureInformation textureInformation)
{
Toolkit::Visual::ResourceStatus resourceStatus;
if(mImpl->mRenderer)
{
- if(usingAtlas)
+ if(textureInformation.useAtlasing)
{
mImpl->mRenderer.RegisterProperty(ATLAS_RECT_UNIFORM_NAME, mAtlasRect);
}
- EnablePreMultipliedAlpha(preMultiplied);
+ EnablePreMultipliedAlpha(textureInformation.preMultiplied);
Actor actor = mPlacementActor.GetHandle();
if(!loadingSuccess)
imageSize = actor.GetProperty(Actor::Property::SIZE).Get<Vector2>();
}
mFactoryCache.UpdateBrokenImageRenderer(mImpl->mRenderer, imageSize);
- textureSet = mImpl->mRenderer.GetTextures();
+ textureInformation.textureSet = mImpl->mRenderer.GetTextures();
}
else
{
Sampler sampler = Sampler::New();
sampler.SetWrapMode(mWrapModeU, mWrapModeV);
- textureSet.SetSampler(0u, sampler);
- mImpl->mRenderer.SetTextures(textureSet);
+ textureInformation.textureSet.SetSampler(0u, sampler);
+ mImpl->mRenderer.SetTextures(textureInformation.textureSet);
}
if(actor)
// Storing TextureSet needed when renderer staged.
if(!mImpl->mRenderer)
{
- mTextures = textureSet;
+ mTextures = textureInformation.textureSet;
}
// Image loaded, set status regardless of staged status.
void UploadCompleted() override;
/**
- * @copydoc TextureUploadObserver::UploadCompleted
+ * @copydoc TextureUploadObserver::LoadCompleted
*
* To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
* This callback is the place to add the renderer as it would be called once the loading is finished.
*/
- void UploadComplete(bool success, int32_t textureId, TextureSet textureSet, bool usingAtlas, const Vector4& atlasRectangle, bool preMultiplied) override;
+ void LoadComplete(bool success, TextureInformation textureInformation) override;
private:
/**
- * @copydoc TextureUploadObserver::LoadComplete
- *
- * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
- * This callback is the place to add the renderer as it would be called once the PixelBuffer loading is finished.
- */
- void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied) override
- {
- }
-
- /**
* Allocate the mask data when a masking property is defined in the property map
*/
void AllocateMaskData();
mLoadingState = LoadingState::LOAD_COMPLETE;
}
-void NPatchData::LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied)
+void NPatchData::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
{
if(loadSuccess)
{
- SetLoadedNPatchData(pixelBuffer, preMultiplied);
+ SetLoadedNPatchData(textureInformation.pixelBuffer, textureInformation.preMultiplied);
}
else
{
for(uint32_t index = 0; index < mObserverList.Count(); ++index)
{
TextureUploadObserver* observer = mObserverList[index];
- observer->UploadComplete(loadSuccess, TextureManager::INVALID_TEXTURE_ID, mTextureSet, false, Vector4(), preMultiplied);
+ observer->LoadComplete(loadSuccess, TextureUploadObserver::TextureInformation(TextureUploadObserver::ReturnType::TEXTURE, TextureManager::INVALID_TEXTURE_ID, mTextureSet, false, Vector4(), textureInformation.preMultiplied));
}
}
private:
/**
- * @copydoc TextureUploadObserver::UploadCompleted
- *
- * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
- * This callback is the place to add the renderer as it would be called once the loading is finished.
- */
- void UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied) override
- {
- }
-
- /**
* @copydoc TextureUploadObserver::LoadComplete
*
* To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
* This callback is the place to add the renderer as it would be called once the loading is finished.
*/
- void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied) override;
+ void LoadComplete(bool loadSuccess, TextureInformation textureInformation) override;
private:
using ObserverListType = Dali::Vector<TextureUploadObserver*>;
}
}
-void NPatchVisual::UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied)
+void NPatchVisual::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
{
- EnablePreMultipliedAlpha(preMultiplied);
- if(!loadSuccess)
+ if(textureInformation.returnType == TextureUploadObserver::ReturnType::TEXTURE)
{
- // Image loaded and ready to display
- ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
- }
-
- if(mAuxiliaryPixelBuffer || !mAuxiliaryUrl.IsValid())
- {
- SetResource();
- }
-}
+ EnablePreMultipliedAlpha(textureInformation.preMultiplied);
+ if(!loadSuccess)
+ {
+ // Image loaded and ready to display
+ ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
+ }
-void NPatchVisual::LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied)
-{
- if(loadSuccess && url.GetUrl() == mAuxiliaryUrl.GetUrl())
- {
- mAuxiliaryPixelBuffer = pixelBuffer;
- SetResource();
+ if(mAuxiliaryPixelBuffer || !mAuxiliaryUrl.IsValid())
+ {
+ SetResource();
+ }
}
- else
+ else // for the ReturnType::PIXEL_BUFFER
{
- // Image loaded and ready to display
- ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
+ if(loadSuccess && textureInformation.url == mAuxiliaryUrl.GetUrl())
+ {
+ mAuxiliaryPixelBuffer = textureInformation.pixelBuffer;
+ SetResource();
+ }
+ else
+ {
+ // Image loaded and ready to display
+ ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
+ }
}
}
private:
/**
- * @copydoc TextureUploadObserver::UploadCompleted
+ * @copydoc TextureUploadObserver::LoadCompleted
*
* To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
* This callback is the place to add the renderer as it would be called once the loading is finished.
*/
- void UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied) override;
-
- /**
- * @copydoc TextureUploadObserver::LoadComplete
- *
- * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
- * This callback is the place to add the renderer as it would be called once the loading is finished.
- */
- void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied) override;
+ void LoadComplete(bool loadSuccess, TextureInformation textureInformation) override;
private:
WeakHandle<Actor> mPlacementActor; ///< Weakhandle to contain Actor during texture loading
TextureManager::LoadState loadState = GetTextureStateInternal(textureId);
if(loadState == TextureManager::LoadState::UPLOADED)
{
- // UploadComplete has already been called - keep the same texture set
+ // LoadComplete has already been called - keep the same texture set
textureSet = GetTextureSet(textureId);
}
}
TextureManager::LoadState loadState = GetTextureStateInternal(textureId);
if(loadState == TextureManager::LoadState::UPLOADED)
{
- // UploadComplete has already been called - keep the same texture set
+ // LoadComplete has already been called - keep the same texture set
textureSet = GetTextureSet(textureId);
}
{
// The Texture has already loaded. The other observers have already been notified.
// We need to send a "late" loaded notification for this observer.
- observer->UploadComplete(true, textureInfo.textureId, textureInfo.textureSet, textureInfo.useAtlas, textureInfo.atlasRect, textureInfo.preMultiplied);
+ observer->LoadComplete(true, TextureUploadObserver::TextureInformation(TextureUploadObserver::ReturnType::TEXTURE, textureInfo.textureId, textureInfo.textureSet, textureInfo.useAtlas, textureInfo.atlasRect, textureInfo.preMultiplied));
}
break;
}
TextureInfo& textureInfo(mTextureInfoContainer[cacheIndex]);
if(textureInfo.loadState == LoadState::UPLOADED)
{
- element.mObserver->UploadComplete(true, textureInfo.textureId, textureInfo.textureSet, textureInfo.useAtlas, textureInfo.atlasRect, textureInfo.preMultiplied);
+ element.mObserver->LoadComplete(true, TextureUploadObserver::TextureInformation(TextureUploadObserver::ReturnType::TEXTURE, textureInfo.textureId, textureInfo.textureSet, textureInfo.useAtlas, textureInfo.atlasRect, textureInfo.preMultiplied));
}
else if(textureInfo.loadState == LoadState::LOAD_FINISHED && textureInfo.storageType == StorageType::RETURN_PIXEL_BUFFER)
{
- element.mObserver->LoadComplete(true, textureInfo.pixelBuffer, textureInfo.url, textureInfo.preMultiplied);
+ element.mObserver->LoadComplete(true, TextureUploadObserver::TextureInformation(TextureUploadObserver::ReturnType::PIXEL_BUFFER, textureInfo.pixelBuffer, textureInfo.url.GetUrl(), textureInfo.preMultiplied));
}
else
{
{
TextureUploadObserver* observer = info->observerList[0];
- // During UploadComplete() a Control ResourceReady() signal is emitted.
+ // During LoadComplete() a Control ResourceReady() signal is emitted.
// During that signal the app may add remove /add Textures (e.g. via
// ImageViews).
// It is possible for observers to be removed from the observer list,
if(info->storageType == StorageType::RETURN_PIXEL_BUFFER)
{
- observer->LoadComplete(success, info->pixelBuffer, info->url, info->preMultiplied);
+ observer->LoadComplete(success, TextureUploadObserver::TextureInformation(TextureUploadObserver::ReturnType::PIXEL_BUFFER, info->pixelBuffer, info->url.GetUrl(), info->preMultiplied));
}
else
{
- observer->UploadComplete(success, info->textureId, info->textureSet, info->useAtlas, info->atlasRect, info->preMultiplied);
+ observer->LoadComplete(success, TextureUploadObserver::TextureInformation(TextureUploadObserver::ReturnType::TEXTURE, info->textureId, info->textureSet, info->useAtlas, info->atlasRect, info->preMultiplied));
}
// Get the textureInfo from the container again as it may have been invalidated.
* @brief Requests an image load of the given URL.
*
* The parameters are used to specify how the image is loaded.
- * The observer has the UploadComplete method called when the load is ready.
+ * The observer has the LoadComplete method called when the load is ready.
*
* When the client has finished with the Texture, Remove() should be called.
*
* @brief Requests an image load of the given URL.
*
* The parameters are used to specify how the image is loaded.
- * The observer has the UploadComplete method called when the load is ready.
+ * The observer has the LoadComplete method called when the load is ready.
*
* When the client has finished with the Texture, Remove() should be called.
*
* the blended texture.
*
* The parameters are used to specify how the image is loaded.
- * The observer has the UploadComplete method called when the load is ready.
+ * The observer has the LoadComplete method called when the load is ready.
*
* When the client has finished with the Texture, Remove() should be called.
*
* CPU blend with the mask, and upload the blend texture.
*
* The parameters are used to specify how the image is loaded.
- * The observer has the UploadComplete method called when the load is ready.
+ * The observer has the LoadComplete method called when the load is ready.
*
* When the client has finished with the Texture, Remove() should be called.
*
bool CreateTiledGeometry(const Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo);
/**
- * Mark the texture as complete, and inform observers
- * @param[in] textureInfo The struct associated with this Texture
- */
- void UploadComplete(TextureInfo& textureInfo);
-
- /**
* Notify the current observers that the texture upload is complete,
* then remove the observers from the list.
* @param[in] textureInfo The struct associated with this Texture
// CLASS HEADER
#include "texture-upload-observer.h"
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/visuals/texture-manager-impl.h>
+
namespace Dali
{
namespace Toolkit
{
+TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied)
+: returnType(returnType),
+ textureId(textureId),
+ textureSet(textureSet),
+ useAtlasing(useAtlasing),
+ atlasRect(atlasRect),
+ preMultiplied(preMultiplied),
+ pixelBuffer(),
+ url()
+{
+}
+
+TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, Devel::PixelBuffer pixelBuffer, const std::string& url, bool preMultiplied)
+: returnType(returnType),
+ textureId(Internal::TextureManager::INVALID_TEXTURE_ID),
+ textureSet(),
+ useAtlasing(false),
+ atlasRect(Vector4::ZERO),
+ preMultiplied(preMultiplied),
+ pixelBuffer(pixelBuffer),
+ url(url)
+{
+}
+
TextureUploadObserver::TextureUploadObserver()
{
}
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/public-api/signals/dali-signal.h>
+#include <dali/public-api/rendering/texture-set.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-url.h>
namespace Dali
{
-class TextureSet;
namespace Toolkit
{
/**
* @brief Base class used to observe the upload status of a texture.
*
- * Derived class must implement the UploadComplete method which is
+ * Derived class must implement the LoadComplete method which is
* executed once the texture is ready to draw.
*/
class TextureUploadObserver
public:
typedef Signal<void(TextureUploadObserver*)> DestructionSignalType; ///< Signal prototype for the Destruction Signal.
+ enum class ReturnType
+ {
+ TEXTURE = 0,
+ PIXEL_BUFFER
+ };
+
+ struct TextureInformation
+ {
+ TextureInformation(ReturnType returnType, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied);
+ TextureInformation(ReturnType returnType, Devel::PixelBuffer pixelBuffer, const std::string& url, bool preMultiplied);
+
+ TextureInformation();
+
+ ReturnType returnType; ///< Returned Texture type.
+ int32_t textureId; ///< The textureId of the loaded texture in the TextureManager
+ TextureSet textureSet; ///< The TextureSet containing the Texture
+ bool useAtlasing; ///< True if atlasing was used (note: this may be different to what was requested)
+ const Vector4& atlasRect; ///< If using atlasing, this is the rectangle within the atlas to use.
+ bool preMultiplied; ///< True if the image had pre-multiplied alpha applied
+ Devel::PixelBuffer pixelBuffer; ///< The PixelBuffer of the loaded image.
+ std::string_view url; ///< The url address of the loaded image.
+ };
+
+public:
/**
* @brief Constructor.
*/
virtual ~TextureUploadObserver();
/**
- * The action to be taken once the async load has finished and the upload to GPU is completed.
- * This should be overridden by the deriving class.
- *
- * @param[in] loadSuccess True if the texture load was successful (i.e. the resource is available). If false, then the resource failed to load. In future, this will automatically upload a "broken" image.
- * @param[in] textureId The textureId of the loaded texture in the TextureManager
- * @param[in] textureSet The TextureSet containing the Texture
- * @param[in] useAtlasing True if atlasing was used (note: this may be different to what was requested)
- * @param[in] atlasRect If using atlasing, this is the rectangle within the atlas to use.
- * @param[in] preMultiplied True if the image had pre-multiplied alpha applied
- */
- virtual void UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied) = 0;
-
- /**
* The action to be taken once the async load has finished.
+ * And in case of texture loading, this method is called after uploading.
* This should be overridden by the deriving class.
*
- * @param[in] loadSuccess True if the image load was successful (i.e. the resource is available). If false, then the resource failed to load.
- * @param[in] pixelBuffer The PixelBuffer of the loaded image.
- * @param[in] url The url address of the loaded image.
- * @param[in] preMultiplied True if the image had pre-multiplied alpha applied
+ * @param[in] loadSuccess True if the texture load was successful (i.e. the resource is available). If false, then the resource failed to load. In future, this will automatically upload a "broken" image.
+ * @param[in] textureInformation Structure that contains loaded texture information.
*/
- virtual void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const Internal::VisualUrl& url, bool preMultiplied) = 0;
+ virtual void LoadComplete(bool loadSuccess, TextureInformation textureInformation) = 0;
/**
* @brief Returns the destruction signal.