mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
examples/lottie: added more show cases
This commit is contained in:
parent
63613992c4
commit
e17cc45ba8
11 changed files with 23 additions and 6 deletions
|
@ -30,7 +30,7 @@
|
|||
/************************************************************************/
|
||||
|
||||
#define NUM_PER_ROW 10
|
||||
#define NUM_PER_COL 9
|
||||
#define NUM_PER_COL 10
|
||||
#define SIZE (WIDTH/NUM_PER_ROW)
|
||||
|
||||
static int counter = 0;
|
||||
|
@ -99,10 +99,7 @@ void tvgUpdateCmds(Elm_Transit_Effect *effect, Elm_Transit* transit, double prog
|
|||
|
||||
if (frame != animation->curFrame()) {
|
||||
auto before = ecore_time_get();
|
||||
|
||||
animation->frame(frame);
|
||||
swCanvas->update(animation->picture());
|
||||
|
||||
auto after = ecore_time_get();
|
||||
updateTime += after - before;
|
||||
}
|
||||
|
@ -137,13 +134,23 @@ void tvgSwTest(uint32_t* buffer)
|
|||
|
||||
void drawSwView(void* data, Eo* obj)
|
||||
{
|
||||
//canvas update
|
||||
auto before = ecore_time_get();
|
||||
|
||||
swCanvas->update();
|
||||
|
||||
auto after = ecore_time_get();
|
||||
|
||||
updateTime += (after - before);
|
||||
|
||||
//canvas draw
|
||||
before = ecore_time_get();
|
||||
|
||||
if (swCanvas->draw() == tvg::Result::Success) {
|
||||
swCanvas->sync();
|
||||
}
|
||||
|
||||
auto after = ecore_time_get();
|
||||
after = ecore_time_get();
|
||||
|
||||
auto rasterTime = after - before;
|
||||
|
||||
|
@ -179,7 +186,7 @@ int main(int argc, char **argv)
|
|||
if (threads > 0) --threads; //Allow the designated main thread capacity
|
||||
|
||||
//Initialize ThorVG Engine
|
||||
if (tvg::Initializer::init(tvg::CanvasEngine::Sw, 3) == tvg::Result::Success) {
|
||||
if (tvg::Initializer::init(tvg::CanvasEngine::Sw, 4) == tvg::Result::Success) {
|
||||
|
||||
elm_init(argc, argv);
|
||||
|
||||
|
|
1
src/examples/images/cat_loader.json
Normal file
1
src/examples/images/cat_loader.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/driving.json
Normal file
1
src/examples/images/driving.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/dropball.json
Normal file
1
src/examples/images/dropball.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/fiery_skull.json
Normal file
1
src/examples/images/fiery_skull.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/fly_in_beaker.json
Normal file
1
src/examples/images/fly_in_beaker.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/isometric.json
Normal file
1
src/examples/images/isometric.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/radar.json
Normal file
1
src/examples/images/radar.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/sad_emoji.json
Normal file
1
src/examples/images/sad_emoji.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/uk_flag.json
Normal file
1
src/examples/images/uk_flag.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/yesno.json
Normal file
1
src/examples/images/yesno.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue