X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fimage%2Fimage-visual.h;h=0e4009bd09d1049fa0ff3b9514a85e7c4dc02a4c;hb=d234b59deebc2c0629b70447003199d51ef17054;hp=d56ab1454498567f62e7034acb0be60187e0429b;hpb=d1bfa44065d50bf39a50f8953accb7e565a9c4cc;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/image/image-visual.h b/dali-toolkit/internal/visuals/image/image-visual.h index d56ab14..0e4009b 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.h +++ b/dali-toolkit/internal/visuals/image/image-visual.h @@ -32,6 +32,7 @@ #include #include #include +#include namespace Dali { @@ -64,6 +65,7 @@ typedef IntrusivePtr< ImageVisual > ImageVisualPtr; * | pixelArea | VECTOR4 | * | wrapModeU | INTEGER OR STRING | * | wrapModeV | INTEGER OR STRING | + * | releasePolicy | INTEGER OR STRING | * * where pixelArea is a rectangular area. * In its Vector4 value, the first two elements indicate the top-left position of the area, @@ -95,6 +97,11 @@ typedef IntrusivePtr< ImageVisual > ImageVisualPtr; * "DEFAULT" * * + * where releasePolicy should be one of the following policies for when to cache the image + * "DETACHED" // Release image from cache when visual detached from stage + * "DESTROYED" // Keep image in cache until the visual is destroyed + * "NEVER" // Keep image in cache until application ends. + * * If the Visual is in a LayerUI it will pixel align the image, using a Layer3D will disable pixel alignment. * Changing layer behaviour between LayerUI to Layer3D whilst the visual is already staged will not have an effect. */ @@ -304,9 +311,9 @@ private: void SetTextureRectUniform( const Vector4& textureRect ); /** - * Remove the texture if it is not used anymore. + * Remove texture with valid TextureId */ - void RemoveTexture(const std::string& url); + void RemoveTexture(); /** * Helper method to set individual values by index key. @@ -330,8 +337,9 @@ private: Dali::SamplingMode::Type mSamplingMode:4; Dali::WrapMode::Type mWrapModeU:3; Dali::WrapMode::Type mWrapModeV:3; + DevelImageVisual::ReleasePolicy::Type mReleasePolicy; bool mAttemptAtlasing; ///< If true will attempt atlasing, otherwise create unique texture - bool mLoadingStatus; ///< True if the texture is being loaded asynchronously, or false when it has loaded. + bool mLoading; ///< True if the texture is still loading. };