mbox series

[fbtest,00/17] Export feature and large ellipses support

Message ID 20241215104508.191237-1-geert@linux-m68k.org (mailing list archive)
Headers show
Series Export feature and large ellipses support | expand

Message

Geert Uytterhoeven Dec. 15, 2024, 10:44 a.m. UTC
Hi all,

Recently, I ran into a segmentation fault when running test002 ("Draw a
grid and some ellipses") on a system with a display resolution of
2560x1440.  This turned out to be due to a 32-bit overflow in the
ellipse drawing routines.

This patch series:
  - Adds support for operating on a virtual buffer in RAM instead of on
    a real frame buffer device, and exporting the result as a PPM image,
    which is useful for e.g. testing drawing algorithms on screen sizes
    not supported by your hardware,
  - Fixes the drawing of ellipses on large displays,
  - Contains some small fixe and improvements.

I intend to apply these to
https://git.kernel.org/pub/scm/linux/kernel/git/geert/fbtest.git/.

Thanks for your comments!

Geert Uytterhoeven (17):
  Add support for exporting virtual test images
  tests: Print test description in debug mode
  Test002: Fix test description
  drawops: Extract do_circle()
  drawops: Use "y == 0" in draw_ellipse_points()
  drawops: Remove always-false check in generic_fill_ellipse()
  drawops: Refactor generic_draw_ellipse()
  drawops: Return early in generic_{draw,fill}_ellipse()
  drawops: Extract do_ellipse()
  drawops: Make de in do_circle() unsigned
  drawops: Make dT1 and dS1 in do_ellipse() unsigned
  drawops: Fix crash when drawing large ellipses
  tests: Clear frame buffer before each test
  Make variables that are never negative unsigned
  test013: Fix off-by-one error in maximum circle calculation
  visops: Mark fall-through switch case
  util: Use __attribute__

 console.c            |   2 +-
 drawops/generic.c    | 427 ++++++++++++++++++++++---------------------
 export.c             | 176 ++++++++++++++++++
 fb.c                 |  11 +-
 include/export.h     |  14 ++
 include/fb.h         |   1 +
 include/types.h      |   3 +
 include/util.h       |   3 +-
 main.c               |  33 +++-
 pixmap.c             |   6 +-
 tests.c              |   7 +-
 tests/test002.c      |   2 +-
 tests/test004.c      |   2 +-
 tests/test006.c      |   2 +-
 tests/test007.c      |   2 +-
 tests/test009.c      |   2 +-
 tests/test010.c      |   2 +-
 tests/test013.c      |   4 +-
 util.c               |   6 +
 visops/pseudocolor.c |   1 +
 visual.c             |   2 +-
 21 files changed, 476 insertions(+), 232 deletions(-)
 create mode 100644 export.c
 create mode 100644 include/export.h