mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-30 15:17:33 +08:00
fix(thorvg): fix sw_engine crash (#6372)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -88,7 +88,7 @@ static bool _rasterMaskedPolygonImageSegment(SwSurface* surface, const SwImage*
|
|||||||
int32_t sh = image->h;
|
int32_t sh = image->h;
|
||||||
int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
|
int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
|
||||||
int32_t vv = 0, uu = 0;
|
int32_t vv = 0, uu = 0;
|
||||||
int32_t minx = INT32_MAX, maxx = INT32_MIN;
|
int32_t minx = INT32_MAX, maxx = 0;
|
||||||
float dx, u, v, iptr;
|
float dx, u, v, iptr;
|
||||||
SwSpan* span = nullptr; //used only when rle based.
|
SwSpan* span = nullptr; //used only when rle based.
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ static bool _rasterMaskedPolygonImageSegment(SwSurface* surface, const SwImage*
|
|||||||
|
|
||||||
if (!region) {
|
if (!region) {
|
||||||
minx = INT32_MAX;
|
minx = INT32_MAX;
|
||||||
maxx = INT32_MIN;
|
maxx = 0;
|
||||||
//one single row, could be consisted of multiple spans.
|
//one single row, could be consisted of multiple spans.
|
||||||
while (span->y == y && spanIdx < image->rle->size) {
|
while (span->y == y && spanIdx < image->rle->size) {
|
||||||
if (minx > span->x) minx = span->x;
|
if (minx > span->x) minx = span->x;
|
||||||
@@ -281,7 +281,7 @@ static void _rasterBlendingPolygonImageSegment(SwSurface* surface, const SwImage
|
|||||||
int32_t dw = surface->stride;
|
int32_t dw = surface->stride;
|
||||||
int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
|
int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
|
||||||
int32_t vv = 0, uu = 0;
|
int32_t vv = 0, uu = 0;
|
||||||
int32_t minx = INT32_MAX, maxx = INT32_MIN;
|
int32_t minx = INT32_MAX, maxx = 0;
|
||||||
float dx, u, v, iptr;
|
float dx, u, v, iptr;
|
||||||
uint32_t* buf;
|
uint32_t* buf;
|
||||||
SwSpan* span = nullptr; //used only when rle based.
|
SwSpan* span = nullptr; //used only when rle based.
|
||||||
@@ -310,7 +310,7 @@ static void _rasterBlendingPolygonImageSegment(SwSurface* surface, const SwImage
|
|||||||
|
|
||||||
if (!region) {
|
if (!region) {
|
||||||
minx = INT32_MAX;
|
minx = INT32_MAX;
|
||||||
maxx = INT32_MIN;
|
maxx = 0;
|
||||||
//one single row, could be consisted of multiple spans.
|
//one single row, could be consisted of multiple spans.
|
||||||
while (span->y == y && spanIdx < image->rle->size) {
|
while (span->y == y && spanIdx < image->rle->size) {
|
||||||
if (minx > span->x) minx = span->x;
|
if (minx > span->x) minx = span->x;
|
||||||
@@ -458,7 +458,7 @@ static void _rasterPolygonImageSegment(SwSurface* surface, const SwImage* image,
|
|||||||
int32_t dw = surface->stride;
|
int32_t dw = surface->stride;
|
||||||
int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
|
int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
|
||||||
int32_t vv = 0, uu = 0;
|
int32_t vv = 0, uu = 0;
|
||||||
int32_t minx = INT32_MAX, maxx = INT32_MIN;
|
int32_t minx = INT32_MAX, maxx = 0;
|
||||||
float dx, u, v, iptr;
|
float dx, u, v, iptr;
|
||||||
uint32_t* buf;
|
uint32_t* buf;
|
||||||
SwSpan* span = nullptr; //used only when rle based.
|
SwSpan* span = nullptr; //used only when rle based.
|
||||||
@@ -492,7 +492,7 @@ static void _rasterPolygonImageSegment(SwSurface* surface, const SwImage* image,
|
|||||||
|
|
||||||
if (!region) {
|
if (!region) {
|
||||||
minx = INT32_MAX;
|
minx = INT32_MAX;
|
||||||
maxx = INT32_MIN;
|
maxx = 0;
|
||||||
//one single row, could be consisted of multiple spans.
|
//one single row, could be consisted of multiple spans.
|
||||||
while (span->y == y && spanIdx < image->rle->size) {
|
while (span->y == y && spanIdx < image->rle->size) {
|
||||||
if (minx > span->x) minx = span->x;
|
if (minx > span->x) minx = span->x;
|
||||||
|
|||||||
Reference in New Issue
Block a user