https://github.com/tanpuer/SkiaUI2 for iOS
Just a git commit, just for fun, no further development.
steps:
- Using Skia Metal context.
- Two threads: ui-thread & render-thread.
- Only support FlexboxLayout. Measure/Layout/Draw are triggered by Vsync.
- TouchEvents: dispatchTouchEvent/interceptTouchEvent/onTouchEvent.
- Animations support scale/rotate/translate,the interpolator will be executed in Layout then update SkRect.
- Supported Widgets:
View: rect, cornerRadius.
ImageView: support png/gif, scaleType,cornerRadius, blur.
TextView: use SkParagraph, use AlimamaFangYuanTiVF-Thin.ttf by default.
Icon: use the iconfont.woff by default.
ProgressBar: circle and linear style,also can be dragged.
SVGView: svg file.
ShaderView: render simple fragment-shader.
Lottie: render lottie.json.
YUVVideoView: render video by AVFoundation/SkRuntimeEffect.
LyricView: parse .srt files, use RecyclerView to render lyric.
MovingArea: intercept TouchEvents by default and can move.
Swiper: just like ViewPager.
Other CustomsViews: Loading, Switch, Radio, Picker...
PlatformView: TODO!!!
... - scrollView: scroll, fling,for more optimizations.
- RecyclerView: adapter,ViewHolder,for more optimizations.
- Page: act as the same role as Activity.
- C++: See CppTest.cpp.
- Dirty-Render: markDirty after "draw" if necessary.