From 09842419548755e56c6b24cb1ee3fbea72c12457 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 11 Mar 2021 20:10:11 +0900 Subject: [PATCH] sw_engine fill: correct value loss by data conversion. --- src/lib/sw_engine/tvgSwFill.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/sw_engine/tvgSwFill.cpp b/src/lib/sw_engine/tvgSwFill.cpp index 676cd6eb..79ae1ae0 100644 --- a/src/lib/sw_engine/tvgSwFill.cpp +++ b/src/lib/sw_engine/tvgSwFill.cpp @@ -248,8 +248,8 @@ void fillFetchLinear(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x, //we can use fixed point math if (v < vMax && v > vMin) { - auto t2 = static_cast(t * FIXPT_SIZE); - auto inc2 = static_cast(inc * FIXPT_SIZE); + auto t2 = static_cast(t * FIXPT_SIZE); + auto inc2 = static_cast(inc * FIXPT_SIZE); for (uint32_t j = 0; j < len; ++j) { *dst = _fixedPixel(fill, t2); ++dst;