summaryrefslogtreecommitdiffstats
path: root/thirdparty/thorvg/src/renderer/tvgRender.cpp
diff options
context:
space:
mode:
authorMartin Capitanio <capnm@capitanio.org>2023-12-30 02:19:05 +0100
committerMartin Capitanio <capnm@capitanio.org>2023-12-31 16:14:44 +0100
commit74ed6d63bfc7cd022737b3356999789d4ef5d5ec (patch)
tree96ad2689f9789e26251ac8840a0670ec3554e99b /thirdparty/thorvg/src/renderer/tvgRender.cpp
parent13a0d6e9b253654f5cc2a44f3d0b3cae10440443 (diff)
downloadredot-engine-74ed6d63bfc7cd022737b3356999789d4ef5d5ec.tar.gz
ThorVG: update from v0.11.2 to v0.11.6
https://github.com/thorvg/thorvg/releases/tag/v0.11.6 Godot related: + [Renderer] Improved the internal structure for compact scene-hierarchy traversing. + [SwEngine] Improved trigonometric & image scaler performance. + [SwEngine] Fixed a loss of image pixels during image down-scaling. + [Renderer/Engine] Improved safety measures. + [SwEngine] Resolved a bug causing strokes to be improperly invisible due to clipping. thorvg/thorvg#1785 + [Renderer] Rectified the precision of rounded rectangle corners. thorvg/thorvg#1824 + [Portability] Resolved compiler shadowing warnings. thorvg/thorvg#1811 Fixes godotengine#85465 Clipped strokes from outside the canvas. Fixes godotengine#86012 Rounded rectangles in SVG files rendering incorrectly.
Diffstat (limited to 'thirdparty/thorvg/src/renderer/tvgRender.cpp')
-rw-r--r--thirdparty/thorvg/src/renderer/tvgRender.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/thirdparty/thorvg/src/renderer/tvgRender.cpp b/thirdparty/thorvg/src/renderer/tvgRender.cpp
index 9768b5ede0..64d76d3562 100644
--- a/thirdparty/thorvg/src/renderer/tvgRender.cpp
+++ b/thirdparty/thorvg/src/renderer/tvgRender.cpp
@@ -39,12 +39,9 @@ void RenderTransform::override(const Matrix& m)
}
-bool RenderTransform::update()
+void RenderTransform::update()
{
- if (overriding) return true;
-
- //Init Status
- if (mathZero(x) && mathZero(y) && mathZero(degree) && mathEqual(scale, 1)) return false;
+ if (overriding) return;
mathIdentity(&m);
@@ -53,17 +50,13 @@ bool RenderTransform::update()
if (!mathZero(degree)) mathRotate(&m, degree);
mathTranslate(&m, x, y);
-
- return true;
-}
-
-
-RenderTransform::RenderTransform()
-{
}
RenderTransform::RenderTransform(const RenderTransform* lhs, const RenderTransform* rhs)
{
- m = mathMultiply(&lhs->m, &rhs->m);
+ if (lhs && rhs) m = mathMultiply(&lhs->m, &rhs->m);
+ else if (lhs) m = lhs->m;
+ else if (rhs) m = rhs->m;
+ else mathIdentity(&m);
}