Commit graph

13 commits

Author SHA1 Message Date
Hermet Park
e12a244b9e renderer: Rectified the paint transforms.
This corrects the return value to Result::InsufficientCondition
when a custom transform is applied.

Additionally, unnecessary x and y member fields have been removed.
2024-07-12 11:01:01 +09:00
Hermet Park
d928c93239 renderer: optimize the ClipPath fast-track.
this optimization applies when the clipper is
not an axis-aligned rectangle under the following conditions:

a. Coverage where the clipper is a regional superset of the viewport.
b. Coverage where the clipper is completely outside of the viewport.

issue: https://github.com/thorvg/thorvg/issues/2332
2024-06-24 14:44:21 +09:00
Hermet Park
5a6d31a2e9 renderer: code clean up 2024-06-24 14:44:15 +09:00
Hermet Park
407fcf69e3 common: code refactoring
Replace the math functions with operator overloading.
This should potentially reduce the code size.
2024-06-24 14:33:49 +09:00
Hermet Park
2b2d41221f renderer: Fix a crash issue related to the clipper
Fixed a crash that occurred when a given clipper had no data.
Properly handle this exceptional case to prevent the crash.

issue: https://github.com/thorvg/thorvg/issues/2083
2024-04-06 12:08:23 +09:00
Hermet Park
9f4a8de253 renderer: destroy engines safely.
Introduced a reference count to destroy it safely.
2024-04-05 17:46:48 +09:00
Hermet Park
a8fc3a6e50 renderer: revise the internal logic.
dispose of the resources at the end of the paint deletion.
This will help retain the resources of the retained paints
and reuse them after reconstructing the next scene.
2024-04-05 17:46:32 +09:00
Hermet Park
636890e20b renderer: code refactoring.
replaced references with pointers to ensure consistency.
no logical changes.
2024-04-05 17:42:42 +09:00
Jinny You
92288c8291 updated copyright date (#1866) 2024-01-02 20:34:12 +09:00
Hermet Park
54528b6ac9 renderer: introduce a ThorVG Text interface.
Introduced New APIs under the experimental tags.

- Result Text::font(const char* name, float size, const char* style = nullptr);
- Result Text::text(const char* text);
- Result Text::fill(uint8_t r, uint8_t g, uint8_t b);
- static Result Text::load(const std::string& path);
- static Result Text::unload(const std::string& path);
- static Text::std::unique_ptr<Text> gen();
- static Text::uint32_t identifier()

@Issue: https://github.com/thorvg/thorvg/issues/969
2024-01-02 20:34:11 +09:00
Hermet Park
c8a8bb5af4 renderer/paint: added a blend update flag.
Keep track of the update changes accurately.
We can utilize this value change in the backend engine.
2023-12-26 18:05:22 +09:00
Hermet Park
c18643f9b6 renderer: revise the internal paints structure.
Get rid of the polymorphism function table,
use the switch directly instead.

We profiled, both binary & performance is better than before.

Tested on a local machine (single thread):
- Lottie: 2ms improved
- Binary: -0.5kb
2023-12-26 18:01:57 +09:00
Hermet Park
24711e485c infra: renames the source folders
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00
Renamed from src/lib/tvgPaint.cpp (Browse further)