summaryrefslogtreecommitdiff
path: root/src/cairo-mono-scan-converter.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix -Wunused-function warningsKhaled Hosny2023-02-061-24/+0
|
* Fix a double free in _cairo_mono_scan_converter_createFeysh INC2022-04-221-1/+0
| | | | | | | | | | | | | | When `_mono_scan_converter_init` failed, `self->converter->polygon` will be freed by `polygon_fini()`. However, the `bail` branch still called `polygon_fini()` to free `self->converter->polygon`. We remvoe the redundant `polygon_fini()` in `_mono_scan_converter_init` to avoid the double free. This fixes #557. Signed-off-by: Feysh INC <opensource@feysh.com>
* Use _cairo_malloc instead of mallocAdrian Johnson2018-05-071-1/+1
| | | | | | | | | | _cairo_malloc(0) always returns NULL, but has not been used consistently. This patch replaces many calls to malloc() with _cairo_malloc(). Fixes: fdo# 101547 CVE: CVE-2017-9814 Heap buffer overflow at cairo-truetype-subset.c:1299 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* mono-scan-converter: Use edge->is_vertical flagChris Wilson2012-03-101-5/+7
| | | | | | | | The earlier bug found in edge advancement was actually due to the missed opportunity of not performing the increment when we know the step is zero. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* mono: Always bias initial edge advancementZhigang Gong2012-03-011-1/+1
| | | | | | | | | Even for a vertical edge, we still need to bias the error term otherwise later we will find the error term is too larger and advance a pixel on every row. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* mono-scan-convertor: Include space for the closing spanSeongwon Cho2012-02-291-2/+4
| | | | | | | | When estimating the maximum number of spans required for a particular width, we need to include a closing span. Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* mono: Silence valgrind by placing a sentinel value in the sorted bucketsChris Wilson2011-10-121-1/+2
| | | | | | | | | | If the edges finish before we complete the last scanline, we will attempt to skip over the remaining lines using min_height of the sentinel edge (MAX_INT). This causes us to read beyond the end of the array of insertion buckets, unless we place a sentinel value in there to break the loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* mono: Amalgamate adjacent spansChris Wilson2011-09-141-3/+3
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* traps: Send unaligned boxes as trapezoidsChris Wilson2011-09-131-1/+1
| | | | | | | According to the little fishies this performs significantly better. As a bonus, it did not handle overlapping boxes correctly... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* mono-scan-converter: Decrement height as we skip straight edgesChris Wilson2011-09-121-1/+1
| | | | | | Fixes paint-clip-fill-mono. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Introduce a new compositor architectureChris Wilson2011-09-121-0/+607
Having spent the last dev cycle looking at how we could specialize the compositors for various backends, we once again look for the commonalities in order to reduce the duplication. In part this is motivated by the idea that spans is a good interface for both the existent GL backend and pixman, and so they deserve a dedicated compositor. xcb/xlib target an identical rendering system and so they should be using the same compositor, and it should be possible to run that same compositor locally against pixman to generate reference tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> P.S. This brings massive upheaval (read breakage) I've tried delaying in order to fix as many things as possible but now this one patch does far, far, far too much. Apologies in advance for breaking your favourite backend, but trust me in that the end result will be much better. :)