mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-07 14:53:35 +00:00
rlottie: Get size data from the model
This commit is contained in:
parent
abff77e985
commit
7219aeca64
@ -39,7 +39,7 @@ class AnimationImpl {
|
||||
public:
|
||||
void init(const std::shared_ptr<LOTModel> &model);
|
||||
bool update(size_t frameNo, const VSize &size);
|
||||
VSize size() const { return mCompItem->size(); }
|
||||
VSize size() const { return mModel->size(); }
|
||||
double duration() const { return mModel->duration(); }
|
||||
double frameRate() const { return mModel->frameRate(); }
|
||||
size_t totalFrame() const { return mModel->totalFrame(); }
|
||||
|
||||
@ -116,11 +116,6 @@ void LOTCompItem::resize(const VSize &size)
|
||||
mUpdateViewBox = true;
|
||||
}
|
||||
|
||||
VSize LOTCompItem::size() const
|
||||
{
|
||||
return mViewSize;
|
||||
}
|
||||
|
||||
bool LOTCompItem::update(int frameNo)
|
||||
{
|
||||
// check if cached frame is same as requested frame.
|
||||
|
||||
@ -67,7 +67,7 @@ public:
|
||||
static std::unique_ptr<LOTLayerItem> createLayerItem(LOTLayerData *layerData);
|
||||
bool update(int frameNo);
|
||||
void resize(const VSize &size);
|
||||
VSize size() const;
|
||||
VSize size() const { return mViewSize;}
|
||||
void buildRenderTree();
|
||||
const LOTLayerNode * renderTree()const;
|
||||
bool render(const rlottie::Surface &surface);
|
||||
|
||||
@ -955,6 +955,7 @@ class LOTModel
|
||||
{
|
||||
public:
|
||||
bool isStatic() const {return mRoot->isStatic();}
|
||||
VSize size() const {return mRoot->size();}
|
||||
double duration() const {return mRoot->duration();}
|
||||
size_t totalFrame() const {return mRoot->totalFrame();}
|
||||
size_t frameDuration() const {return mRoot->frameDuration();}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user