mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
thorvg: Sync a couple fixes from upstream
We're still formally tracking v0.8.1, those fixes don't impact the library features. I didn't bother documenting them with patches as they will likely soon make their way to either a v0.8.2 or v0.9.0.
This commit is contained in:
parent
3fb1f258be
commit
fb67a685a9
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2020 - 2022 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2020 - 2022 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2020 - 2022 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@ -499,4 +499,4 @@ bool mathUpdateOutlineBBox(const SwOutline* outline, const SwBBox& clipRegion, S
|
||||
renderRegion.max.y = (yMax + 63) >> 6;
|
||||
}
|
||||
return mathClipBBox(clipRegion, renderRegion);
|
||||
}
|
||||
}
|
||||
|
@ -153,4 +153,4 @@ bool mpoolTerm(SwMpool* mpool)
|
||||
free(mpool);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2020 - 2022 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@ -19,6 +19,15 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
#include "tvgMath.h"
|
||||
#include "tvgRender.h"
|
||||
#include "tvgSwCommon.h"
|
||||
|
@ -61,4 +61,4 @@ static bool inline cRasterTranslucentRect(SwSurface* surface, const SwBBox& regi
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -599,4 +599,4 @@ static bool _rasterTexmapPolygon(SwSurface* surface, const SwImage* image, const
|
||||
_rasterPolygonImage(surface, image, region, opacity, polygon, blendMethod, aaSpans);
|
||||
|
||||
return _apply(surface, aaSpans);
|
||||
}
|
||||
}
|
||||
|
@ -1040,4 +1040,4 @@ void rleClipRect(SwRleData *rle, const SwBBox* clip)
|
||||
_replaceClipSpan(rle, spans, spansEnd - spans);
|
||||
|
||||
TVGLOG("SW_ENGINE", "Using ClipRect!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2020 - 2022 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
2
thirdparty/thorvg/src/lib/tvgAccessor.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgAccessor.cpp
vendored
@ -81,4 +81,4 @@ Accessor::Accessor()
|
||||
unique_ptr<Accessor> Accessor::gen() noexcept
|
||||
{
|
||||
return unique_ptr<Accessor>(new Accessor);
|
||||
}
|
||||
}
|
||||
|
2
thirdparty/thorvg/src/lib/tvgFill.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgFill.cpp
vendored
@ -112,4 +112,4 @@ Fill* Fill::duplicate() const noexcept
|
||||
uint32_t Fill::identifier() const noexcept
|
||||
{
|
||||
return pImpl->id;
|
||||
}
|
||||
}
|
||||
|
4
thirdparty/thorvg/src/lib/tvgLzw.h
vendored
4
thirdparty/thorvg/src/lib/tvgLzw.h
vendored
@ -22,10 +22,12 @@
|
||||
#ifndef _TVG_LZW_H_
|
||||
#define _TVG_LZW_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace tvg
|
||||
{
|
||||
uint8_t* lzwEncode(const uint8_t* uncompressed, uint32_t uncompressedSizeBytes, uint32_t* compressedSizeBytes, uint32_t* compressedSizeBits);
|
||||
uint8_t* lzwDecode(const uint8_t* compressed, uint32_t compressedSizeBytes, uint32_t compressedSizeBits, uint32_t uncompressedSizeBytes);
|
||||
}
|
||||
|
||||
#endif //_TVG_LZW_H
|
||||
#endif //_TVG_LZW_H
|
||||
|
2
thirdparty/thorvg/src/lib/tvgPicture.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgPicture.cpp
vendored
@ -118,4 +118,4 @@ const uint32_t* Picture::data(uint32_t* w, uint32_t* h) const noexcept
|
||||
}
|
||||
if (pImpl->surface) return pImpl->surface->buffer;
|
||||
else return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -94,4 +94,4 @@ unique_ptr<RadialGradient> RadialGradient::gen() noexcept
|
||||
uint32_t RadialGradient::identifier() noexcept
|
||||
{
|
||||
return TVG_CLASS_ID_RADIAL;
|
||||
}
|
||||
}
|
||||
|
2
thirdparty/thorvg/src/lib/tvgRender.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgRender.cpp
vendored
@ -70,4 +70,4 @@ RenderTransform::RenderTransform()
|
||||
RenderTransform::RenderTransform(const RenderTransform* lhs, const RenderTransform* rhs)
|
||||
{
|
||||
m = mathMultiply(&lhs->m, &rhs->m);
|
||||
}
|
||||
}
|
||||
|
2
thirdparty/thorvg/src/lib/tvgScene.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgScene.cpp
vendored
@ -73,4 +73,4 @@ Result Scene::clear(bool free) noexcept
|
||||
pImpl->clear(free);
|
||||
|
||||
return Result::Success;
|
||||
}
|
||||
}
|
||||
|
2
thirdparty/thorvg/src/lib/tvgShape.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgShape.cpp
vendored
@ -424,4 +424,4 @@ Result Shape::fill(FillRule r) noexcept
|
||||
FillRule Shape::fillRule() const noexcept
|
||||
{
|
||||
return pImpl->rule;
|
||||
}
|
||||
}
|
||||
|
2
thirdparty/thorvg/src/lib/tvgSwCanvas.cpp
vendored
2
thirdparty/thorvg/src/lib/tvgSwCanvas.cpp
vendored
@ -102,4 +102,4 @@ unique_ptr<SwCanvas> SwCanvas::gen() noexcept
|
||||
return unique_ptr<SwCanvas>(new SwCanvas);
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -134,4 +134,4 @@ void JpgLoader::run(unsigned tid)
|
||||
image = nullptr;
|
||||
}
|
||||
image = jpgdDecompress(decoder);
|
||||
}
|
||||
}
|
||||
|
@ -2644,4 +2644,4 @@ void lodepng_state_cleanup(LodePNGState* state)
|
||||
{
|
||||
lodepng_color_mode_cleanup(&state->info_raw);
|
||||
lodepng_info_cleanup(&state->info_png);
|
||||
}
|
||||
}
|
||||
|
@ -171,4 +171,4 @@ void lodepng_state_cleanup(LodePNGState* state);
|
||||
unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize);
|
||||
unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize);
|
||||
|
||||
#endif //_TVG_LODEPNG_H_
|
||||
#endif //_TVG_LODEPNG_H_
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#elif __FreeBSD__
|
||||
#include<stdlib.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
@ -51,4 +51,4 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif //_TVG_TVG_COMMON_H_
|
||||
#endif //_TVG_TVG_COMMON_H_
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
2
thirdparty/thorvg/update-thorvg.sh
vendored
2
thirdparty/thorvg/update-thorvg.sh
vendored
@ -1,6 +1,6 @@
|
||||
VERSION=0.8.1
|
||||
rm -rf AUTHORS inc LICENSE src *.zip
|
||||
curl -L -O https://github.com/Samsung/thorvg/archive/refs/tags/v$VERSION.zip
|
||||
curl -L -O https://github.com/Samsung/thorvg/archive/$VERSION.zip
|
||||
bsdtar --strip-components=1 -xvf *.zip
|
||||
rm *.zip
|
||||
rm -rf .github docs pc res test tools .git* *.md *.txt wasm_build.sh
|
||||
|
Loading…
Reference in New Issue
Block a user