examples/lottie: added more show cases

This commit is contained in:
Hermet Park 2023-10-23 13:36:50 +09:00
parent 63613992c4
commit e17cc45ba8
11 changed files with 23 additions and 6 deletions

View file

@ -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);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long