GRAPHICS: PixelFormat introduction
|Reported by:||lordhoto||Owned by:||lordhoto|
since we need some way to get a usable pixel format description of the overlay's one, I started to create a SDL_PixelFormat similar struct: Graphics::PixelFormat. This patch basically only adds PixelFormat and a few helpers (RGBToColor, ARGBToColor, colorToRGB, colorToARGB).
The helper functions are currently marked as 'inline', one might want to think about that, but I think it should be fine.
The patch also adds a (documented) method "getOverlayFormat" to OSystem. SDL backend is updated to support it.
Usage for this struct might be: - GUI's VectorRenderer - Scalers, seeing patch tracker item #1664514 "Support for a 32 bit _hwscreen in the SDL backend" - Graphics::Surface to connect a given pixel format with an surface -> GUI's GraphicsWidget, to allow easier conversion to overlay format (falls under Graphics::Surface connection of course)
Ticket imported from: #2216641. Ticket imported from: patches/1039.