Hermet Park
3c884232fd
gl_engine: rewrite the blending shader
...
Completely rewrite the GL backend shader to support advance blending and
correct the blending behavior.
Now the GL backend has the same blending result as SKIA and CanvasRenderingContext2D in browers did.
The formula is referenced from:
https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators
issue: https://github.com/thorvg/thorvg/issues/2799
2025-05-12 13:27:14 +09:00
Thaddeus Crews
e235eb8152
common: support c++20 builds
2025-03-10 09:45:19 +09:00
Hermet Park
dfa05a5c43
common: neat & clean code++
2025-01-17 00:46:03 +09:00
Hermet Park
07e73a9e6f
common: code refactoring
...
use ARRAY_FOREACH() for neat code and
accessing the memory efficiently than normal indexing.
2025-01-15 18:03:46 +09:00
Hermet Park
a12accbc93
updated copyright
2025-01-03 14:32:31 +09:00
Hermet Park
ccf5a8158f
gl_engine: ++binary optimization
...
- removed unique_ptr, shared_ptr
- replaced std::vector with tvg::Array
- reduced binary size by -10kb
2024-12-30 22:24:53 +09:00
Hermet Park
44955b704e
common/math: code refactoring
...
Replaced the prefix "math" with "tvg" namespace.
2024-07-10 00:21:02 +09:00
RuiwenTang
76f98008e8
gl_engine: optimize off-screen rendering
...
Performing a full-screen RenderPass resolve is too expensive.
Because most composite cases only require a small area to be rendered off-screen.
To improve performance, use the bounds of the Geometry for off-screen rendering whenever possible
2024-07-04 11:44:02 +09:00
RuiwenTang
f8626d13d1
gl_engine: fix clip path and bounds not correct
...
* Optimize clip logical, change to use GL_GRATER and keep incrace depth
value, so no need to do depth clear after every clip draw.
* Correct geometry bounding box calculation, and make sure the bounds is
larger than all vertices
* Limit drawing area for off-screen RenderPass with correct scissor box
2024-06-11 20:57:07 +09:00
RuiwenTang
da45fa6608
gl_engine: using depth buffer to support path clip
...
* Append depth buffer attachment in tvgGlRenderPass
* using depth test if Shape has path clip
2024-04-16 13:36:13 +09:00
RuiwenTang
68f7e4c245
gl_engine: enable msaa resolve in GLRenderPass
...
* use GLRenderBuffer in color and stencil attachment, also use x4 sample
count by default.
* add msaa resolve logical at the end of a ComposeTask, so the normal
color texture can get the final rendering result.
2024-03-13 10:12:46 +02:00
Hermet Park
27972ceaa7
gl_engine: fix a compile warnings, errors.
...
../src/renderer/gl_engine/tvgGlRenderPass.cpp:35:34: warning: macro expands to multiple statements [-Wmultistatement-macros]
35 | if (mColorTex != 0) GL_CHECK(glDeleteTextures(1, &mColorTex));
| ^~~~~~~~~~~~~~~~
../src/renderer/gl_engine/tvgGlCommon.h:33:9: note: in definition of macro ‘GL_CHECK’
33 | x; \
| ^
2024-02-22 13:09:00 +09:00
RuiwenTang
c8e0c48636
gl_engine: append stencil attachment in GLRenderTarget
...
Plans to use stencil to test support for path clipping and complex path rendering
When the tessellation algorithm cannot handle it.
2024-01-18 21:11:58 +09:00
Jinny You
2c6c8d3b21
updated copyright date ( #1866 )
2023-12-28 10:43:25 +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