Commit graph

27 commits

Author SHA1 Message Date
Hermet Park
24711e485c infra: renames the source folders
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00
Hermet Park
8a67bff7c9 common: code refactoring
Use own bit operation helper.
2023-04-26 11:15:48 +09:00
Hermet Park
9b3c34c3b1 updated copyright. 2023-01-14 13:48:11 +09:00
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
Hermet Park
9915d41164 Revert "common: introduce iterator"
This reverts commit e947fef9a4.

Bad... This patch was wrongly applied...
2021-12-23 11:29:58 +09:00
Hermet Park
e947fef9a4 common: introduce iterator
+++

auto picture = tvg::Picture::gen();

auto func = [](const tvg::Paint* paint, const tvg::Paint* parent, bool hasChildren) -> int
{
    if (paint->identifier() == Shape::identifier())
        //TODO: override properties.

    //return true to continue, return false to stop.
    return true;
};

picture = tvg::Iteratorv::iterate(move(picture), func);
2021-12-17 12:16:14 +09:00
JunsuChoi
5124a9ad6b infra: Add window build test in CI
Add build test for normal build
2021-10-06 10:44:51 +09:00
Hermet Park
41ad6e16e9 --annoying compiler warnings. 2021-08-09 21:24:27 +09:00
Hermet Park
0773185f92 common initializer: remove unnecessary code.
x is always not equal to zero.
2021-08-09 16:14:36 +09:00
Hermet Park
191442c7ae common initializer: fix out of buffer access by the version info string.
String must be finished at termination charactor,
previous logic missed that handling, now fixed.

@Issue: https://github.com/Samsung/thorvg/issues/690
2021-08-09 14:03:48 +09:00
Hermet Park
a042e771e4
tvg_format: force to check for compatibility by version comparision.
tvg file stores the version info of thorvg when it's generated,
in order to compare it with the runtime thorvg version when it's loaded.

For this, thorvg builds up the current version of symbol on the initilaization step,
that can be referred by the tvg loader.
2021-08-04 15:31:06 +09:00
Hermet Park
e56476b7bd common: code refactoring.
renamed loader classes same to Saver classes

tvgLoaderMgr -> tvgLoader (tvgSaver)
tvgLoader -> tvgLoadModule (tvgSaveModule)
2021-07-22 17:30:02 +09:00
Hermet Park
efa0035fe6 common initializer: correct the result value.
When memory is not allocated successully, it must return the FailedAllocation as the return value.
Previous initializer wrongly returns the value that case, this corrects it.
2021-06-03 20:48:02 +09:00
JunsuChoi
ed8dfbc529 common Initializer: Fix init count
Calling init repeatedly doesn't increment count.
This leads to unwanted termination due to mismatch of the pair.
2021-05-27 17:03:38 +09:00
Hermet Park
6276e209a7 common initializer: counting engine init count properly.
Manage the reference count in common so that
all common resources can be initialized/terminated identically.
2021-04-14 20:18:06 +09:00
Hermet Park
1a7d41ce71 updated copyright 2021-03-23 14:31:58 +09:00
Hermet Park
e8cf21a3c9 initializer: add reference counting for the engines initialization.
Introduced the reference counting for the backend engines so that
tvg prevents unpaired engine initialization/termination calls by user mistake.

@Issues: 296
2021-03-19 19:45:39 +09:00
Hermet Park
1b8188ee67
sw_engine shape: performance optimization.
we introduced shared memory pool for avoiding reallocate memory
while it process the stroke outlines, It experimentally increase
the outline data if we use the allocated memory for multiples shape strokes,
we don't need to alloc/free memory during the process.

This shared outline memory is allocated for threads count
so that we don't interrupt memory access during the tasks.

@Issues: 75
2020-11-04 16:28:47 +09:00
Hermet Park
6365d02a96 optimization: cut off file dependencies.
we should avoid code insertion during file dependencies,
such as #include "xxx.h" which has implementations.

This could increase binary size, we can avoid it as possible.

Current patch improves binary size like this:

From: file(2059008) = text(120360) data(8096) bss(80) dec(128536)
To  : file(1921832) = text(118429) data(7872) bss(56) dec(126357)

More additional patches will come in to optmize binary size.
2020-09-23 20:57:30 +09:00
Hermet Park
8efef7714c common initializer: don't try initialize engine duplicatedly.
Change-Id: I58c715745b8db40fe759582545082f2e6e10626a
2020-08-21 15:56:45 +09:00
Hermet Park
657e6daddb common taskscheduler: revise functionalities.
initialization interfaces has been changed for threads count.

if you want to set concrete threads count by system, please specify thread count with it.

std threads:
tvg::Initializer::init(tvg::CanvasEngine::Sw, std:🧵:hardware_concurrency());

if your system provides designed threads info, you can use it.

efl:
tvg_engine_init(TVG_ENGINE_SW, eina_cpu_count());

I recommend to avoid max threads usage for better performance.

Change-Id: I22cfa315768f73fa941be136956cdbb2cf837c20
2020-08-21 12:26:57 +09:00
Hermet Park
04c6295974 code refactoring
remove unnecessary condition.
implementation won't be included multiple times not like headers.

Thus this condition is unnecessary.

Change-Id: Id37e675c40ce7213a06c950da8e5ca17ff7245c9
2020-08-20 16:16:46 +09:00
Hermet Park
1eb11f249e common initializer: introduce thread count api.
this interface controls the number of threads working behind.

default is 0 == only syncrhonous.

Change-Id: I8404f33359e6213acc5e578061568fede50cd9a6
2020-08-14 18:53:01 +09:00
Hermet Park
9893af979f replace license from Apache 2.0 to MIT
Change-Id: I61f7cb2b0e407bc035f3b2ec7da9b7f230057e24
2020-08-13 16:53:38 +09:00
Hermet Park
99428ee80a build: support features toggling in meson option.
Change-Id: Id1ebda70fe8380aaa913f79af26e5c39893a6df5
2020-07-08 15:30:12 +09:00
Hermet Park
01e52c7c7a common loader: build up loader infrastructure.
Change-Id: I62aaed43015301ec39e414833f37d6c5485d8043
2020-06-19 15:46:02 +09:00
Hermet Park
f627679882 common initializer: replace engine class with intializer
This initializer will take over the global environments of tvg engines.

Change-Id: I7b99973dafaea57ddd3134800bd442ef4dc319ae
2020-06-16 12:54:53 +09:00
Renamed from src/lib/tvgEngine.cpp (Browse further)