projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Jump_to frame and StopBehavior of Animated-image-visual(agif)
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
visuals
/
animated-image
/
image-cache.cpp
diff --git
a/dali-toolkit/internal/visuals/animated-image/image-cache.cpp
b/dali-toolkit/internal/visuals/animated-image/image-cache.cpp
index
84e5f66
..
78ca796
100644
(file)
--- a/
dali-toolkit/internal/visuals/animated-image/image-cache.cpp
+++ b/
dali-toolkit/internal/visuals/animated-image/image-cache.cpp
@@
-31,12
+31,23
@@
ImageCache::ImageCache( TextureManager& textureManager,
mBatchSize( batchSize ),
mUrlIndex(0u),
mWaitingForReadyFrame(false),
mBatchSize( batchSize ),
mUrlIndex(0u),
mWaitingForReadyFrame(false),
- mRequestingLoad(false)
+ mRequestingLoad(false),
+ mTextureManagerAlive(true)
{
{
+ mTextureManager.AddObserver( *this );
}
ImageCache::~ImageCache()
{
}
ImageCache::~ImageCache()
{
+ if( mTextureManagerAlive )
+ {
+ mTextureManager.RemoveObserver( *this );
+ }
+}
+
+void ImageCache::TextureManagerDestroyed()
+{
+ mTextureManagerAlive = false;
}
} //namespace Internal
}
} //namespace Internal