X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Ftexture-upload-observer.h;h=d6657a27c0c802c23de77395b273bfaf0b508bd8;hb=refs%2Fchanges%2F46%2F265846%2F1;hp=a8623f015c47b6a77d4d253b332d6bc707d88ef5;hpb=235a3efd5d00a20adbcae39dfce2c29a6c0344b7;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/texture-upload-observer.h b/dali-toolkit/internal/visuals/texture-upload-observer.h index a8623f0..d6657a2 100644 --- a/dali-toolkit/internal/visuals/texture-upload-observer.h +++ b/dali-toolkit/internal/visuals/texture-upload-observer.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_TEXTURE_UPLOAD_OBSERVER_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,18 +18,20 @@ * */ -#include +// EXTERNAL INCLUDES +#include #include +// INTERNAL INCLUDES +#include +#include + namespace Dali { - class TextureSet; namespace Toolkit { - - /** * @brief Base class used to observe the upload status of a texture. * @@ -39,8 +41,7 @@ namespace Toolkit class TextureUploadObserver { public: - - typedef Signal< void ( TextureUploadObserver* ) > DestructionSignalType; ///< Signal prototype for the Destruction Signal. + typedef Signal DestructionSignalType; ///< Signal prototype for the Destruction Signal. /** * @brief Constructor. @@ -63,8 +64,18 @@ public: * @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; + 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. + * 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 + */ + virtual void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const Internal::VisualUrl& url, bool preMultiplied) = 0; /** * @brief Returns the destruction signal. @@ -74,12 +85,9 @@ public: DestructionSignalType& DestructionSignal(); private: - DestructionSignalType mDestructionSignal; ///< The destruction signal emitted when the observer is destroyed. - }; - } // namespace Toolkit } // namespace Dali