JunsuChoi [Wed, 23 Jun 2021 03:43:45 +0000 (12:43 +0900)]
svg_loader SvgPath: Added corner case handling for flags of Arc
It handles the case what the flag of the arc of the path is defined
without spaces or commas, such as 00, 01, 11 or 10.
JunsuChoi [Thu, 24 Jun 2021 01:28:51 +0000 (10:28 +0900)]
svg2png: Clean up code
Modify the code to fit coding style
Hermet Park [Wed, 23 Jun 2021 12:00:54 +0000 (21:00 +0900)]
svg2png: revise code to fix memory violation.
previous code didn't take care of multi-threading.
This revise code to avoid changing canvas buffer during multi-tasking.
Hermet Park [Wed, 23 Jun 2021 13:46:41 +0000 (22:46 +0900)]
Update tvgSwMath.cpp
fix typo.
Hermet Park [Wed, 23 Jun 2021 10:45:43 +0000 (19:45 +0900)]
tvg_loader: recover wrongly introduced change by my mistake.
Hermet Park [Wed, 23 Jun 2021 08:32:19 +0000 (17:32 +0900)]
+++
Hermet Park [Tue, 22 Jun 2021 10:53:56 +0000 (19:53 +0900)]
tvg_loader: code refactoring.
keep it neat & clean code for better readibility and maintenence.
Hermet Park [Wed, 23 Jun 2021 07:17:10 +0000 (16:17 +0900)]
sw_engine: fix MSVC compatibility problem.
clz (count leading zero) is builtin function
that is not available in MSVC.
This patch replace clz for MSVC env.
Thanks @fire for pointing out this.
Refers: https://stackoverflow.com/questions/355967/how-to-use-msvc-intrinsics-to-get-the-equivalent-of-this-gcc-code
Hermet Park [Wed, 23 Jun 2021 05:50:46 +0000 (14:50 +0900)]
common: fix compatibility issue for MSVC.
strcasecmp() is not supported by MSVC
We can replace it with _stricmp()
thanks @fire for pointing out this.
Hermet Park [Wed, 23 Jun 2021 04:41:58 +0000 (13:41 +0900)]
common: fix compatibility issue for MSVC.
__attribute__ syntax is not supported by MSVC.
We can turn it on optionally.
Hermet Park [Wed, 23 Jun 2021 04:31:13 +0000 (13:31 +0900)]
common: fix compatibility issue for MSVC
Math Constants are not defined in Standard C/C++
for this, we can use _USE_MATH_DEFINES before math headers.
Hermet Park [Wed, 23 Jun 2021 04:09:11 +0000 (13:09 +0900)]
examples: add commentary for exceptions.
Mira Grudzinska [Tue, 22 Jun 2021 09:35:22 +0000 (11:35 +0200)]
sw_engine fill: fixing gradient calculations for 'repeat' spread value
There was a call to the ctable element from outside its boundaries, because
the check was misplaced.
Hermet Park [Wed, 23 Jun 2021 02:47:59 +0000 (11:47 +0900)]
infra: add memory sanitize option in meson
for optimial library, we removed some peripheral information in default,
this breaks asan environment.
This patch changes it to make it both.
if you want to use asan, please change the meson option.
default is disabled.
example)
$meson . build -Db_sanitize=address
$meson . build -Db_sanitize=address,undefined
Mira Grudzinska [Tue, 22 Jun 2021 19:11:34 +0000 (21:11 +0200)]
svg_loader: correct parsing ColorStop offset values
Values different from numbers and percentages should be ignored
and the default values should be applied (zeros).
Hermet Park [Wed, 23 Jun 2021 01:18:46 +0000 (10:18 +0900)]
common loadermgr: fix missing break; in switch-case.
JunsuChoi [Tue, 22 Jun 2021 07:07:55 +0000 (16:07 +0900)]
svg_loader SvgLoader: Copy the missing composite url
When copying an attribute, url information of stype's composite is overwritten with memcpy.
This causes double free by deleting the wrong string in freeNodeStyle.
Hermet Park [Tue, 22 Jun 2021 08:22:39 +0000 (17:22 +0900)]
common scene: fix a regression bug.
That is wrongly changed by
39bf94e506c30a07720a0ef66809dea3331de727
renderer must be valid until all operations is done.
Hermet Park [Tue, 22 Jun 2021 08:05:38 +0000 (17:05 +0900)]
tvg_loader: code refactoring.
remove if-def code.
Actually, tvg log is supposed to print some useful info for users,
not debugging info for our engine developers.
JunsuChoi [Tue, 22 Jun 2021 07:15:05 +0000 (16:15 +0900)]
svg_loader SvgLoader: Prevent invalid access
If there is no path information, it is not copied.
Hermet Park [Tue, 22 Jun 2021 03:45:19 +0000 (12:45 +0900)]
fix a build break in MSVC
add missing string header, string is used for a Picture::load() parameter
Hermet Park [Tue, 22 Jun 2021 02:46:42 +0000 (11:46 +0900)]
common scene: code refactoring.
keep it clean and less LOC.
JunsuChoi [Tue, 22 Jun 2021 04:27:40 +0000 (13:27 +0900)]
svg_loader XmlParser: Fix check the end of string
While skipping the string, check the end of the string first.
Prevents an invalid read when parser really get to the end of the string.
Michal Maciola [Wed, 16 Jun 2021 07:46:36 +0000 (09:46 +0200)]
common: fix a memory leak after scene->clear(true)
If renderer was null, paints was cleared (count set to zero), but data
was not deleted regardless free boolean.
Hermet Park [Mon, 21 Jun 2021 11:18:08 +0000 (20:18 +0900)]
loaders: revise code from
cce4b443b3250d14a3077cf13226f7cacbb82f57
use copy variable instead of additional buffer pointer.
Michal Maciola [Thu, 17 Jun 2021 13:43:47 +0000 (15:43 +0200)]
loaders: added copy param for Picture::load
@API Changed:
Result Picture::load(const char* data, uint32_t size, bool copy /*=false*/) noexcept
TVG_EXPORT Tvg_Result tvg_picture_load_data(Tvg_Paint* paint, const char *data, uint32_t size, bool copy);
JunsuChoi [Fri, 18 Jun 2021 06:40:15 +0000 (15:40 +0900)]
test Scene: Separate tests into SECTION()
Split some tests into SECTIONs based on their type.
This improves the readability of TC.
And developer can run test in SECTION unit.
ex)
./build/test/tvgUnitTests "Pushing Paints Into Scene" -c "Pushing Null Pointer"
Hermet Park [Mon, 21 Jun 2021 03:00:13 +0000 (12:00 +0900)]
bump up version
Change-Id: I7ab9e0002ba57626f502878ccae23e4c3fc8af6a
Mira Grudzinska [Thu, 17 Jun 2021 22:53:49 +0000 (00:53 +0200)]
svg_loader: radial gradient transformation support
For now the gradient radius is scales like x-axis - it has to be changed
after issue #37 will be resolved.
JunsuChoi [Thu, 17 Jun 2021 06:39:41 +0000 (15:39 +0900)]
test Scene: Add tvg::Scene unit tests
- Creation
- Push
- Reserve
- Clear
JunsuChoi [Thu, 17 Jun 2021 08:31:41 +0000 (17:31 +0900)]
infra CI: Upload unit test result to artifact
Users can download the unit test result list from PR-> Checks -> Build Test -> Artifacts.
JunsuChoi [Thu, 17 Jun 2021 08:07:52 +0000 (17:07 +0900)]
infra CI: Fix test flag of test build
test -> tests
Hermet Park [Thu, 17 Jun 2021 05:57:06 +0000 (14:57 +0900)]
test capi: code refactoring.
keep the coding consistency, no logical changes.
Also, renamed tests to avoid conflicts duplicated names.
Michal Szczecinski [Fri, 4 Jun 2021 11:17:25 +0000 (13:17 +0200)]
utc capi: Added linear gradient tests.
Hermet Park [Thu, 17 Jun 2021 05:38:27 +0000 (14:38 +0900)]
test capi: code refactoring.
keep the coding consistency, no logical changes.
Michal Szczecinski [Fri, 4 Jun 2021 11:17:25 +0000 (13:17 +0200)]
utc capi: Added radial gradient tests.
JunsuChoi [Thu, 17 Jun 2021 03:04:12 +0000 (12:04 +0900)]
common Scene: return FailedAllocation if it really failed at memory allocation.
Due to change of f0ecc67, the return type of reserve() is changed to bool,
which can return the result for the fail case.
Mira Grudzinska [Wed, 16 Jun 2021 23:30:45 +0000 (01:30 +0200)]
svg_loader: key and value in the simpleXmlParseW3CAttribute needed to be cleared out of spaces
Mira Grudzinska [Wed, 16 Jun 2021 23:12:57 +0000 (01:12 +0200)]
svg_loader: fixing color parsing
For colors given in a style attribute in the format "rgb(rrr, ggg, bbb)"
a parsing was incorect. Now fixed.
Mira Grudzinska [Wed, 16 Jun 2021 14:16:02 +0000 (16:16 +0200)]
svg_loader: after reading an unsupported style attribute no other values were loaded
After finding an unsupported style attribute the log is printed (on request)
and processing of other values continues.
Mira Grudzinska [Wed, 16 Jun 2021 13:54:12 +0000 (15:54 +0200)]
svg_loader: adding check if stroke-dasharray attribute != none
The stroke-dasharray value equal to "none" was causing a segfault
during a conversion to float. Fixed now.
Michal Maciola [Wed, 16 Jun 2021 09:15:08 +0000 (11:15 +0200)]
utc capi: added capiSwCanvas test cases
Hermet Park [Wed, 16 Jun 2021 03:51:07 +0000 (12:51 +0900)]
tset capi: code refactoring.
revise coding style.
Hermet Park [Wed, 16 Jun 2021 03:22:08 +0000 (12:22 +0900)]
test capi: fix build infrastructure
mmaciola [Wed, 16 Jun 2021 03:16:59 +0000 (05:16 +0200)]
utc capi: Added capi initializer, canvas, paint and shape utc
Mira Grudzinska [Mon, 14 Jun 2021 21:38:51 +0000 (23:38 +0200)]
svg_loader: gradient update takes into account a stroke and a fill
For shapes with a grad fill and a grad stroke only the fill was drawn.
After this fix both can have a valid gradient.
Hermet Park [Mon, 14 Jun 2021 05:32:05 +0000 (14:32 +0900)]
tvg_loader: code refactoring.
renamed internal functions, no logical changes.
Michal Maciola [Fri, 11 Jun 2021 14:34:05 +0000 (16:34 +0200)]
loader_mgr: FileTypes order changed
FileType order was changed in tvgLoaderMgr.h to move Tvg at the beginning.
When raw data loading [LoaderMgr::loader(data, size)], loaders are tried
one by one (in order according to the FileType enum) until the correct loader
is found.
When using EFL and load edj, multiple loader(data, size) with tvg data may be
called. This change should improve performance in that case.
mmaciola [Mon, 14 Jun 2021 05:18:10 +0000 (07:18 +0200)]
tvg_loader: added tvg format verification
TVG format verification was added on TvgLoader:open()
Hermet Park [Fri, 11 Jun 2021 17:01:18 +0000 (02:01 +0900)]
tests capi: revise the show-case & infrastructure.
Change-Id: I0ea2ba3d7099bcb2a4bce052259e3e6a266eb6dc
Michal Szczecinski [Fri, 4 Jun 2021 08:11:11 +0000 (10:11 +0200)]
utc capi: Added shape fill utc.
Michal Maciola [Fri, 11 Jun 2021 13:55:24 +0000 (15:55 +0200)]
tvg_loader: Fixed missing 'this->' keyword
Fixed missed 'this->' in tvgTvgLoader.cpp
Hermet Park [Fri, 11 Jun 2021 12:02:36 +0000 (21:02 +0900)]
Michal Maciola [Mon, 31 May 2021 09:44:59 +0000 (11:44 +0200)]
capi: picture load data
Added 'tvg_picture_load_data' capi.
Hermet Park [Fri, 11 Jun 2021 06:08:40 +0000 (15:08 +0900)]
tvg_loader: code refactoring.
revise it under the tvg coding convention.
Hermet Park [Fri, 11 Jun 2021 06:14:35 +0000 (15:14 +0900)]
tests: add SwCanvasBase unit tests
Hermet Park [Fri, 11 Jun 2021 03:58:15 +0000 (12:58 +0900)]
examples tvg: clean up for tvg consistency.
no logical changes.
mmaciola [Fri, 11 Jun 2021 03:51:35 +0000 (05:51 +0200)]
TVG Loader/Saver module: tvg loader example
mmaciola [Fri, 11 Jun 2021 03:49:37 +0000 (05:49 +0200)]
TVG Loader/Saver: tvg loader introduced
This patch introduces tvg loader module for loading .tvg binary files.
This allows to load and reuse pregenerated scene.
tvg file format:
.tvg is a binary file format designed for saving/restoring the scene content.
It allows to save scenes and reuse them in other apps or to restore state of
the application.
@Example:
auto picture = tvg::Picture::gen();
picture->load(EXAMPLE_DIR"/tvg_file.tvg");
canvas->push(move(picture));
@API Additions:
Result paint(std::unique_ptr<Paint> paint) noexcept;
@Issue: Issue ticket is #375.
Change-Id: Ic9c8c2d78a368f50ab1f040778cdb15b8d917cb1
Hermet Park [Thu, 10 Jun 2021 11:00:55 +0000 (20:00 +0900)]
examples: updated samples.
one of children paint can not be updated immediately with a canvas.
the root paint must be passed, otherwise requesting whole canvas is the best idea.
Change-Id: Ia9ffd76054effadccc651bac6ffbdb8988d3e334
Hermet Park [Thu, 10 Jun 2021 03:44:20 +0000 (12:44 +0900)]
examples: revise examples
remove the show-cases that accessing the raw memory from the unique_ptr
we don't like to use those cases without any inevitable excuse.
Change-Id: I3417ce563285a58e063640123f15436c7319fc85
Hermet Park [Thu, 10 Jun 2021 06:50:56 +0000 (15:50 +0900)]
common canvas: ++ case cover exception scenarios.
Do not update the paint if it's not pushed in the canvas.
Change-Id: I5cfd0e107389eac0e2b0947593bef1f6bc7215f5
Mira Grudzinska [Wed, 9 Jun 2021 21:52:12 +0000 (23:52 +0200)]
svg_loader: support stroke gradient
The loader was ready to handle the gradient stroke, but there was no API to support
it when the loader was introduced. We've had this API for a while already, so
its call has been added.
Change-Id: Ifbda04027b79e84524cf166f05e331c9a33901e9
Hermet Park [Thu, 10 Jun 2021 02:33:57 +0000 (11:33 +0900)]
common canvas: ++ exception handling.
canvas update won't be performed if it's on drawing condition nor zero paints.
Change-Id: Ifb05ed0dc27e052d3d35c45c1a4a75cab3c31446
Hermet Park [Wed, 9 Jun 2021 12:07:13 +0000 (21:07 +0900)]
examples stacking: ++ scene stacking.
Change-Id: I368bddde7f058a1752ba55227205ff4dc30cb687
Hermet Park [Wed, 9 Jun 2021 11:07:28 +0000 (20:07 +0900)]
common canvas: supplement corner cases.
filled up corner cases to return the result properly.
Canvas newly has a drawing condition to prevent usage-violation.
Change-Id: I634d301e8754382eacbe2fd4f8ed0fa1b9b516a6
Hermet Park [Wed, 9 Jun 2021 09:11:23 +0000 (18:11 +0900)]
test SwCanvas: ++ case cover.
All prerequiste condition must be passed successfully.
Each test case should verify them before actual unit-test.
Change-Id: I7cbba9b299dd9808ccdd80e1d892435e283abe30
Hermet Park [Tue, 8 Jun 2021 08:30:00 +0000 (17:30 +0900)]
test SwCanvas: -- out of spec, don't guratee the result.
Change-Id: I7b50c4d8b48c1f494ceb5d42817cc0cfa6cdaa1f
Hermet Park [Tue, 8 Jun 2021 08:26:36 +0000 (17:26 +0900)]
test SwCanvas: ++case cover
Change-Id: I7be382dc1175cc27ddeb244b910283af54bcb95c
Mira Grudzinska [Tue, 8 Jun 2021 00:06:35 +0000 (02:06 +0200)]
sw_engine: added check whether surface width <= surface stride
In a case width > stride segf occured. Such a case should be treated
as an invalid arg.
Change-Id: I662a697d0a99b20510a164d5c02515537dc76475
Hermet Park [Fri, 4 Jun 2021 10:40:18 +0000 (19:40 +0900)]
tests: add SwCanvas unit tests
Change-Id: I2736062a6f64606faebef43a2e5281dc220e0def
Mira Grudzinska [Mon, 7 Jun 2021 13:48:52 +0000 (15:48 +0200)]
sw_engine: fixing the composition for canvas width != canvas stride
When canvas width was smaller than its stride and a composition is used,
the plots were drawn incorrectly. This is fixed by setting the image width
(image from a compositor) to be equal to the surface stride, instead of its width.
The image data are now allocated accordingly the fixed image width.
Change-Id: I9faa3374bf8efb85d7f6c429c41e5fd182982ed9
Hermet Park [Mon, 7 Jun 2021 11:08:53 +0000 (20:08 +0900)]
Revert "tests: add SwCanvas base part unit tests"
This reverts commit
ce6348a5047a94ebf5e1c790c0cbd96a8c785249.
This isn't intended pushing...
Hermet Park [Mon, 7 Jun 2021 11:04:39 +0000 (20:04 +0900)]
common canvas: return FailedAllocation if it really failed at memory allocation.
This fixes SwCanvasBase Reservation Unit Test.
Hermet Park [Mon, 7 Jun 2021 10:57:52 +0000 (19:57 +0900)]
tests: add SwCanvas base part unit tests
Hermet Park [Mon, 7 Jun 2021 10:39:10 +0000 (19:39 +0900)]
sw_engine mempool: tiny optimization.
don't mempool anything if the option is same.
JunsuChoi [Mon, 7 Jun 2021 03:09:58 +0000 (12:09 +0900)]
svg_loader SceneBuilder: Remove incorrect calculation for radial gradient
We are doing enough calculations in the parser if the unit is user space.
This causes the cx,cy coordinates of radial gradient to be calculated incorrectly.
So remove it.
JunsuChoi [Fri, 4 Jun 2021 07:07:59 +0000 (16:07 +0900)]
svg_loader SceneBuilder: Remove incorrect calculation for linear gradient
Calculation of objectBoundingBox case in linear gradient is incorrect code.
This causes the x,y coordinates of the linear gradient to be calculated incorrectly.
So remove it.
Hermet Park [Mon, 7 Jun 2021 09:09:35 +0000 (18:09 +0900)]
sw_engine renderer: fix to success SwCanvas Unit Test.
render init count shouldn't be counted when it's in a fail-case.
Hermet Park [Mon, 7 Jun 2021 09:01:26 +0000 (18:01 +0900)]
canvas: fix for SwCanvas Unit Test
Fixed to fail canvas generation if engines are not initialized.
Hermet Park [Mon, 7 Jun 2021 08:38:49 +0000 (17:38 +0900)]
doc: correct the beginning year
Hermet Park [Mon, 7 Jun 2021 08:36:19 +0000 (17:36 +0900)]
common: fix typo
Michal Maciola [Fri, 21 May 2021 11:30:58 +0000 (13:30 +0200)]
TVG Loader/Saver: tvg helper file ('tvgTvgHelper.h') introduced
This patch introduces tvgTvgHelper.h file that contains base definitions used
for .tvg loader and saver modules. Indicators, flags and sizes are defined
and base tvgBlock struct is declared here.
'tvgTvgHelper.h' file is essential only for .tvg loader/saver module and it
doesn't affect any other file. Loader and saver modules itself are introduced
in other, further patches.
.tvg is a binary file format designed for saving/restoring the scene content.
It allows to save scenes and reuse them in other apps or to restore state of
the application.
Hermet Park [Mon, 7 Jun 2021 03:55:44 +0000 (12:55 +0900)]
common taskScheduler: fix wrong thread indexing due to duplicated variable names.
That mistake could invoke inproper threads....
Mira Grudzinska [Sun, 6 Jun 2021 22:14:37 +0000 (00:14 +0200)]
svg_loader: initializing uninitialized variables
The 'loader->svgParse->global' variable was uninitialized when no viewBox attribute
was set. If gradient was applied, the division by zero occured and no gradient was drawn.
Hermet Park [Mon, 7 Jun 2021 03:26:38 +0000 (12:26 +0900)]
bump up v0.2.0
Change-Id: I93f0dc0796e714968a3bf43b829f4545aa6d685f
Hermet Park [Sun, 6 Jun 2021 08:36:48 +0000 (17:36 +0900)]
infra: just released v0.2.0
Change-Id: Ie86e9e31edd768fbc229344d8acd823cbad39c52
Hermet Park [Sun, 6 Jun 2021 08:12:41 +0000 (17:12 +0900)]
infra: set higher version to try the devel symbols with higher priority than released ones.
Change-Id: I77773874c509ed74ae07dbce588f9b39c2bb28db
Michal Szczecinski [Fri, 4 Jun 2021 11:24:29 +0000 (13:24 +0200)]
common gradient: Fix possible crash in color setter
Memcpy is not allowed on nullptr. If colorStops is invalid colors are
cleared.
Change-Id: I3f6655a008a0ee7a0ce8abcb20c7692630b45282
Michal Maciola [Fri, 4 Jun 2021 09:27:33 +0000 (11:27 +0200)]
capi: include <stdint.h> into thorvg_capi.h
Change-Id: Idcf75fdf8461895ae684e9241d40cb373c5b133f
Hermet Park [Fri, 4 Jun 2021 08:46:04 +0000 (17:46 +0900)]
Update CONTRIBUTING.md
fix typos.
Change-Id: Ie31d4fb456fd116c41ec2a11ea81c6ccf1140cbd
Hermet Park [Fri, 4 Jun 2021 08:43:04 +0000 (17:43 +0900)]
Update CONTRIBUTING.md
++ self-test & verification
Change-Id: Iee8406098b57670c02b723bf024876a2e946ba3a
Hermet Park [Thu, 3 Jun 2021 12:01:54 +0000 (21:01 +0900)]
capi: add tvg_paint_get_transform() api.
Change-Id: Iac271fc25e0ec409a17296c359a4a34c9bdb0e6e
Hermet Park [Fri, 4 Jun 2021 07:46:34 +0000 (16:46 +0900)]
tests: introduce catch2 unit tests infrastructure.
Catch2 is a multi-paradigm test framework for C++.
It is primarily distributed as a single header file,
very easy and simple to adopt this to thorvg project.
This patch introduces catch2 infrastsructure and one prototype as a sample.
You can refer "testInitializer.cpp", how to add unit test!
while ignoring else files such as "catch2.hpp", "testMain.cpp"
Also, enable Unit-tests with meson option when you change any thorvg code.
$meson build -Dtests=true.
launch tvgUnitTest in the build result then verify 100% coverage
before submitting any patches.
Change-Id: Icc09d4402dc38c8a92a1cebb2cb502728c092f36
Hermet Park [Thu, 3 Jun 2021 11:48:02 +0000 (20:48 +0900)]
common initializer: correct the result value.
When memory is not allocated successully, it must return the FailedAllocation as the return value.
Previous initializer wrongly returns the value that case, this corrects it.
Change-Id: I244900ed9bce20c74a0ef5fce4e199b7ffa4e67a
Hermet Park [Wed, 2 Jun 2021 11:27:05 +0000 (20:27 +0900)]
infra: install capi header file only its binding option is enabled.
decouple the capi header from the default headers by replacing it in capi folder.
now it's also installed optionally.
Change-Id: I11f6ebc238cfd1e4086026846560464aab44ec98
Hermet Park [Thu, 3 Jun 2021 04:54:54 +0000 (13:54 +0900)]
test: remove gtest & its infra.
thorvg is going to use catch2 framework, this is a cleanup work
before introducing catch2 utc.
See Catch2:
https://github.com/catchorg/Catch2/tree/v2.x
Change-Id: I78a0054d4307b4664353dd0e5376518f3861bb71
Hermet Park [Thu, 3 Jun 2021 02:45:59 +0000 (11:45 +0900)]
sw_engine rle: code refactoring.
keep it neat code, --loc
Change-Id: I0125c712899a8bdf96e4fb0486683d04422cd63f
Hermet Park [Wed, 2 Jun 2021 12:15:58 +0000 (21:15 +0900)]
sw_engine: data optimization.
changed alpha channel data type to 32 bits from 8 bits,
since subsequent data operations requires 32 bits values.
this 8 bits (since channel range is up to 255) doesn't helpful
for saving memory size because it would generate additional data casting by compiler.
I compared the binary size and this patch saves about 600bytes.
Change-Id: Ieeab3a1361fe0a5c58be493d7b3ff70e1b801562
Mira Grudzinska [Wed, 2 Jun 2021 12:01:12 +0000 (14:01 +0200)]
sw_engine common: improving the alpha blending algorithm
Calculations accuracy in ALPHA_BLEND function has been
improved. Until now blending resulted in a slight hue change
(all color channels affected). The chosen method of calculation
is a compromise between the accuracy and the performance.
Change-Id: Ic4dad4c73ab74b6071b69c32f34394474ade6e5a