+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "evasapp.h"
#include "lottieview.h"
#include<iostream>
LottieViewTest(EvasApp *app, bool renderMode) {
mApp = app;
mRenderMode = renderMode;
+ ecore_animator_frametime_set(1.0/120.0);
}
void show(int numberOfImage) {
int count = numberOfImage;
int colums = (int) ceil(sqrt(count));
int offset = 3;
- int vw = (mApp->width() - (2 * offset * colums))/colums;
+ int vw = (mApp->width() - (offset * colums))/colums;
int vh = vw;
int posx = offset;
int posy = offset;
}
void render() {
+ //auto clock = std::chrono::high_resolution_clock::now();
for (auto &i : mViews) {
i->render();
}
+ //double d = std::chrono::duration<double, std::milli>(std::chrono::high_resolution_clock::now()-clock).count();
+ //printf("total time taken = %f\n", d);
}
public:
renderMode = false;
}
LottieViewTest *view = new LottieViewTest(app, renderMode);
- view->show(50);
+ view->show(250);
app->addExitCb(onExitCb, view);
app->addRenderPreCb(onRenderPreCb, view);