-
-RollingAnimatedImageCache::RollingAnimatedImageCache(
- TextureManager& textureManager, AnimatedImageLoading& animatedImageLoading, uint32_t frameCount, ImageCache::FrameReadyObserver& observer,
- uint16_t cacheSize, uint16_t batchSize, bool isSynchronousLoading )
-: ImageCache( textureManager, observer, batchSize ),
- mAnimatedImageLoading( animatedImageLoading ),
- mFrameCount( frameCount ),
- mFrameIndex( 0 ),
- mCacheSize( cacheSize ),
- mQueue( cacheSize ),
- mIsSynchronousLoading( isSynchronousLoading ),
- mOnLoading( false )
+namespace
+{
+static constexpr uint32_t SINGLE_IMAGE_COUNT = 1u;
+static constexpr uint32_t FIRST_FRAME_INDEX = 0u;
+} // namespace
+
+RollingAnimatedImageCache::RollingAnimatedImageCache(TextureManager& textureManager,
+ AnimatedImageLoading& animatedImageLoading,
+ TextureManager::MaskingDataPointer& maskingData,
+ ImageCache::FrameReadyObserver& observer,
+ uint16_t cacheSize,
+ uint16_t batchSize,
+ bool isSynchronousLoading,
+ bool preMultiplyOnLoad)
+: ImageCache(textureManager, maskingData, observer, batchSize, 0u),
+ mImageUrl(animatedImageLoading.GetUrl()),
+ mAnimatedImageLoading(animatedImageLoading),
+ mFrameCount(SINGLE_IMAGE_COUNT),
+ mFrameIndex(FIRST_FRAME_INDEX),
+ mCacheSize(cacheSize),
+ mQueue(cacheSize),
+ mIsSynchronousLoading(isSynchronousLoading),
+ mPreMultiplyOnLoad(preMultiplyOnLoad)