Sergii Liebodkin
548962f5f8
apis/engines: Revise the clear() buffer behavior.
...
ThorVG has offered an option to clear the buffer since version 1.0.
This is essential when users utilize the canvas target buffer
with the main render target. They share the buffer
and need to draw contents onto the existing contents.
API:
Result Canvas::clear(bool free = true)
-> Result Canvas::clear(bool paints = true, bool buffer = true)
Tvg_Result tvg_canvas_clear(Tvg_Canvas* canvas, bool free);
-> Tvg_Result tvg_canvas_clear(Tvg_Canvas* canvas, bool paints, bool buffer);
Issue: https://github.com/thorvg/thorvg/issues/1779
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2023-11-20 18:23:00 +09:00
Hermet Park
6e6dd8a97e
gl_engine/renderer: skip sync if nothing should be done.
...
update by 66305f3e6d
2023-11-15 22:33:39 +09:00
RuiwenTang
a1c3a4a5ad
gl_engine: fix memory out of bounds error in GlGpuBuffer
...
If buffer data is larger than memory alignment, need to make sure there
is enough memory in current stage buffer
2023-11-03 11:21:31 +09:00
Hermet Park
db55481e97
renamed stroke apis family.
...
float Shape::stroke(float width) -> float Shape::strokeWidth(float width)
Result Shape::stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) -> Result Shape::strokeFill(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255)
Result Shape::stroke(std::unique_ptr<Fill> f) -> Result Shape::strokeFill(std::unique_ptr<Fill> f)
Result Shape::stroke(const float* dashPattern, uint32_t cnt, float offset = 0.0f) -> Result Shape::strokeDash(const float* dashPattern, uint32_t cnt, float offset = 0.0f)
Result Shape::stroke(StrokeCap cap) -> Result Shape::strokeCap(StrokeCap cap)
Result Shape::stroke(StrokeJoin join) -> Result Shape::strokeJoin(StrokeJoin join)
Result Shape::strokeColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a = nullptr) const -> Result Shape::strokeFill(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a = nullptr) const
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-10-27 11:46:51 +09:00
RuiwenTang
fea0d1bb77
gl_engine: use raw pointer to pass and hold GlRenderTask
2023-10-23 18:08:14 +09:00
Hermet Park
3ef740145f
gl_engine: fix a compiler warning.
...
../src/renderer/gl_engine/tvgGlRenderPass.cpp:37:29: warning: macro expands to multiple statements [-Wmultistatement-macros]
37 | if (mColorTex) GL_CHECK(glDeleteTextures(1, &mColorTex));
2023-10-20 11:26:10 +09:00
RuiwenTang
6a2b34df73
gl_engine: support basic alpha composite
...
* introduce a new class GlRenderPass to hold off-screen rendering result
* add basic alpha composite support with begin/end render-pass
2023-10-20 10:51:04 +09:00
RuiwenTang
4722550e06
gl_engine: support clip by using scissor and stencil
2023-10-12 23:18:12 +09:00
RuiwenTang
6a3a03f29f
gl_engine: support render image
2023-10-04 12:41:22 +09:00
RuiwenTang
453cba7ddd
gl_engine: make GlRenderTask generic with uniform block
...
* Use uniform block to pack all color informations
* Move the actual gl draw call into GlRenderer::sync function, so all
data is been uploaded into GPU
* Make GlRenderTask simple and generic for direct gl draw
2023-09-21 22:24:07 +09:00
RuiwenTang
5298f338de
gl_engine: fix compilation erros due to redundant header inclusion
2023-09-14 19:49:35 +09:00
Hermet Park
64a444aeb6
loader/lottie: support focal property in the radial gradient
2023-09-05 10:29:12 +09:00
RuiwenTang
b6e168b315
gl_engine: pack all data into one gpu buffer
...
Pack all data into one gpu buffer to avoid memory fragmentation
2023-09-05 00:38:27 +09:00
Hermet Park
5a73bcaa8f
common/array: code refactoring
...
easy access to a specific data with a operator.
2023-08-29 12:28:38 +09:00
Hermet Park
24711e485c
infra: renames the source folders
...
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00