Commit graph

9 commits

Author SHA1 Message Date
Hermet Park
8c4b9b2772 renderer: code refactoring
Replaced the transformation with
a strong associated data field.

This helps to reduce the binary size (-1k).
2024-08-09 10:49:26 +09:00
Hermet Park
0c709b2e43 common: code refactoring
Trimming the transform data pass,
from RenderTransform to Matrix.

No logical changes.
2024-08-09 10:37:39 +09:00
Hermet Park
19815de7d7 renderer: ++optimization
skip locking if the thread number is 0.
2024-07-12 11:18:56 +09:00
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
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
090ebfba86 xrenderer/engines: support the canvas viewport function.
The viewport function defines the rectangular area of the canvas
that will be used for drawing operations.

It is used to clip the rendering output to the boundaries of the rectangle.
Apps can use this function to set the drawing region within the canvas.

When the ThorVG canvas is partially inside the screen area such as during scrolling
it could help enhance rendering performance.

New Experimental API:
- Result Canvas::viewport(int32_t x, int32_t y, int32_t w, int32_t h) noexcept;

Issue: https://github.com/thorvg/thorvg/issues/2274
2024-06-24 14:20:46 +09:00
Jinny You
92288c8291 updated copyright date (#1866) 2024-01-02 20:34:12 +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/tvgRender.cpp (Browse further)