*/
Surface() = default;
private:
- uint32_t *mBuffer;
- size_t mWidth;
- size_t mHeight;
- size_t mBytesPerLine;
+ uint32_t *mBuffer{nullptr};
+ size_t mWidth{0};
+ size_t mHeight{0};
+ size_t mBytesPerLine{0};
};
class LOT_EXPORT Animation {
RenderTask() { receiver = sender.get_future(); }
std::promise<Surface> sender;
std::future<Surface> receiver;
- AnimationImpl *playerImpl;
- size_t frameNo;
+ AnimationImpl *playerImpl{nullptr};
+ size_t frameNo{0};
Surface surface;
};
float mCombinedAlpha{0.0};
int mFrameNo{-1};
DirtyFlag mDirtyFlag{DirtyFlagBit::All};
- bool mStatic;
+ bool mStatic{false};
};
class LOTCompLayerItem: public LOTLayerItem
private:
std::vector<LOTLayerNode *> mLayersCNode;
std::vector<std::unique_ptr<LOTLayerItem>> mLayers;
- int mLastFrame;
};
class LOTSolidLayerItem: public LOTLayerItem
virtual void updateRenderNode();
inline float parentAlpha() const {return mParentAlpha;}
public:
- float mParentAlpha;
+ float mParentAlpha{1.0f};
VPath mPath;
DirtyFlag mFlag;
- int mFrameNo;
+ int mFrameNo{-1};
std::vector<LOTPathDataItem *> mPathItems;
std::unique_ptr<VDrawable> mDrawable;
bool mStaticContent;
private:
LOTFillData *mData;
VColor mColor;
- FillRule mFillRule;
+ FillRule mFillRule{FillRule::Winding};
};
class LOTGFillItem : public LOTPaintDataItem
private:
LOTGFillData *mData;
std::unique_ptr<VGradient> mGradient;
- FillRule mFillRule;
+ FillRule mFillRule{FillRule::Winding};
};
class LOTStrokeItem : public LOTPaintDataItem
void updateRenderNode() final;
private:
LOTStrokeData *mData;
- CapStyle mCap;
- JoinStyle mJoin;
- float mMiterLimit;
+ CapStyle mCap{CapStyle::Flat};
+ JoinStyle mJoin{JoinStyle::Miter};
+ float mMiterLimit{0};
VColor mColor;
- float mWidth;
+ float mWidth{0};
float mDashArray[6];
- int mDashArraySize;
+ int mDashArraySize{0};
};
class LOTGStrokeItem : public LOTPaintDataItem
private:
LOTGStrokeData *mData;
std::unique_ptr<VGradient> mGradient;
- CapStyle mCap;
- JoinStyle mJoin;
- float mMiterLimit;
+ CapStyle mCap{CapStyle::Flat};
+ JoinStyle mJoin{JoinStyle::Miter};
+ float mMiterLimit{0};
VColor mColor;
- float mWidth;
+ float mWidth{0};
float mDashArray[6];
- int mDashArraySize;
+ int mDashArraySize{0};
};
}
public:
T mValue;
- int mPropertyIndex; /* "ix" */
+ int mPropertyIndex{0}; /* "ix" */
std::unique_ptr<LOTAnimInfo<T>> mAnimInfo;
};
MatteType mMatteType{MatteType::None};
VRect mBound;
- LayerType mLayerType; //lottie layer type (solid/shape/precomp)
+ LayerType mLayerType{LayerType::Null}; //lottie layer type (solid/shape/precomp)
int mParentId{-1}; // Lottie the id of the parent in the composition
int mId{-1}; // Lottie the group id used for parenting.
long mInFrame{0};
long mOutFrame{0};
long mStartFrame{0};
- LottieBlendMode mBlendMode;
+ LottieBlendMode mBlendMode{LottieBlendMode::Normal};
float mTimeStreatch{1.0f};
std::string mPreCompRefId;
LOTAnimatable<float> mTimeRemap; /* "tm" */
bool mRoot{false};
bool mAutoOrient{false};
std::vector<std::shared_ptr<LOTMaskData>> mMasks;
- LOTCompositionData *mCompRef;
+ LOTCompositionData *mCompRef{nullptr};
};
class LOTCompositionData : public LOTData
VSize mSize;
long mStartFrame{0};
long mEndFrame{0};
- float mFrameRate;
+ float mFrameRate{60};
LottieBlendMode mBlendMode;
std::shared_ptr<LOTLayerData> mRootLayer;
std::unordered_map<std::string,
LOTAnimatable<LottieColor> mColor; /* "c" */
LOTAnimatable<int> mOpacity{100}; /* "o" */
LOTAnimatable<float> mWidth{0}; /* "w" */
- CapStyle mCapStyle; /* "lc" */
- JoinStyle mJoinStyle; /* "lj" */
+ CapStyle mCapStyle{CapStyle::Flat}; /* "lc" */
+ JoinStyle mJoinStyle{JoinStyle::Miter}; /* "lj" */
float mMeterLimit{0}; /* "ml" */
LOTDashProperty mDash;
bool mEnabled{true}; /* "fillEnabled" */
private:
void populate(VGradientStops &stops, int frameNo);
public:
- int mGradientType; /* "t" Linear=1 , Radial = 2*/
+ int mGradientType{1}; /* "t" Linear=1 , Radial = 2*/
LOTAnimatable<VPointF> mStartPoint; /* "s" */
LOTAnimatable<VPointF> mEndPoint; /* "e" */
LOTAnimatable<float> mHighlightLength{0}; /* "h" */
int getDashInfo(int frameNo, float *array) const;
public:
LOTAnimatable<float> mWidth; /* "w" */
- CapStyle mCapStyle; /* "lc" */
- JoinStyle mJoinStyle; /* "lj" */
+ CapStyle mCapStyle{CapStyle::Flat}; /* "lc" */
+ JoinStyle mJoinStyle{JoinStyle::Miter}; /* "lj" */
float mMeterLimit{0}; /* "ml" */
LOTDashProperty mDash;
};
protected:
std::shared_ptr<LOTCompositionData> mComposition;
- LOTCompositionData * compRef;
- LOTLayerData * curLayerRef;
+ LOTCompositionData * compRef{nullptr};
+ LOTLayerData * curLayerRef{nullptr};
std::vector<std::shared_ptr<LOTLayerData>> mLayersToUpdate;
void SkipOut(int depth);
};
private:
void detach();
void cleanUp(VBitmapData *x);
- VBitmapData *d;
+ VBitmapData *d{nullptr};
};
V_END_NAMESPACE
public:
VBrush::Type mType{Type::NoBrush};
VColor mColor;
- const VGradient *mGradient;
+ const VGradient *mGradient{nullptr};
};
V_END_NAMESPACE
void stringify(std::ostream& os, char* start, char const* const end);
private:
- size_t m_bytes_used;
- size_t m_buffer_size;
+ size_t m_bytes_used{0};
+ size_t m_buffer_size{0};
std::unique_ptr<char[]> m_heap_buffer;
bool m_logAll;
char m_stack_buffer[256 - sizeof(bool) - 2 * sizeof(size_t) -
inline CacheInfo(VGradientStops s) : stops(std::move(s)) {}
uint32_t buffer32[VGradient::colorTableSize];
VGradientStops stops;
- bool alpha;
+ bool alpha{true};
};
typedef std::unordered_multimap<uint64_t, std::shared_ptr<const CacheInfo>>
int bytesPerLine() const { return mBytesPerLine; }
int bytesPerPixel() const { return mBytesPerPixel; }
- VBitmap::Format mFormat;
+ VBitmap::Format mFormat{VBitmap::Format::ARGB32_Premultiplied};
VPainter::CompositionMode mCompositionMode;
private:
- int mWidth;
- int mHeight;
- int mBytesPerLine;
- int mBytesPerPixel;
- uchar *mBuffer;
+ int mWidth{0};
+ int mHeight{0};
+ int mBytesPerLine{0};
+ int mBytesPerPixel{0};
+ uchar *mBuffer{nullptr};
};
struct VGradientData {