[Pixman] [PATCH 1/4] Implement floating point gradient computation

2018-12-03 Thread Basile Clement
This patch modifies the gradient walker to be able to generate floating point values directly in addition to a8r8g8b8 32 bit values. This is then used by the various gradient implementations to render in floating point when asked to do so, instead of rendering to a8r8g8b8 and then expanding to flo

[Pixman] [PATCH 2/4] Implement basic dithering for the wide pipeline

2018-12-03 Thread Basile Clement
This patch implements dithering in pixman. A "dither" property is added to BITS images, which is used to: - Force rendering to the image to go through the floating point pipeline. Note that this is different from FAST_PATH_NARROW_FORMAT as it should not enable the floating point pipeline

[Pixman] [PATCH 3/4] test: Check the dithering path in tolerance-test

2018-12-03 Thread Basile Clement
From: Basile Clement This adds support for testing dithered destinations in tolerance-test. When dithering is enabled, the pixel checker allows for an additional quantization error. --- test/tolerance-test.c | 22 +++- test/utils.c | 122 ++

[Pixman] [PATCH 4/4] demos: Add a dithering demo

2018-12-03 Thread Basile Clement
From: Basile Clement This adds a dither.c which provides a demo of the dithering feature. This is based on the scale.c demo for scaling and provides a selection of intermediate formats and dithering operators (currently, only PIXMAN_DITHER_BAYER_8) to use. Images are first blitted onto a surface

Re: [Pixman] [PATCH 1/4] Implement floating point gradient computation

2018-12-03 Thread Basile Clement
This is essentially a duplicate of the recent patch by Maarten Lankhorst (which spurred me into finally posting these, which laid on my laptop for a couple months), with a slightly different approach.  It is mostly included as it is a prerequisite for the subsequent patches, but they should wor

Re: [Pixman] [PATCH] pixman: Use maximum precision for gradients

2018-12-03 Thread Chris Wilson
Quoting Maarten Lankhorst (2018-12-03 14:00:31) > The high precision gradient path was falling back to the 8-bit path, > then expanding it to float. This removed any advantage of the high > precision path, so make sure our gradients are computed as floats > by adding a separate path. > > Signed-of

[Pixman] [PATCH] pixman: Use maximum precision for gradients

2018-12-03 Thread Maarten Lankhorst
The high precision gradient path was falling back to the 8-bit path, then expanding it to float. This removed any advantage of the high precision path, so make sure our gradients are computed as floats by adding a separate path. Signed-off-by: Maarten Lankhorst --- pixman/pixman-conical-gradient