office-gobmx/canvas
Noel Grandin 81994cb2b8 Convert internal vcl bitmap formats transparency->alpha (II)
(Second attempt at landing this)

Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.

Add a couple of new Color constants to make the intention
of the vcl code clearer.

Notes
(*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask
to more accurately reflect the requirements of the
CGImageCreateWithMask function seems to fix some
tests.

(*) The vcl code does not properly support gradients
with transparency. So the previous code was wrong, and this
change is going to result in slightly different wrongness.

Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-25 08:38:12 +02:00
..
inc BaseMutex->std::mutex in canvas::CachedPrimitiveBase 2023-02-22 10:15:29 +00:00
opengl make the shaders compliant to GLSL 1.2 2014-09-02 01:08:47 +02:00
qa/cppunit improve readability of VirtualDevice constructor 2023-02-07 10:19:32 +00:00
source Convert internal vcl bitmap formats transparency->alpha (II) 2023-07-25 08:38:12 +02:00
workben clang-tidy modernize-pass-by-value in canvas 2022-05-21 21:55:31 +02:00
CppunitTest_canvas_test.mk make it possible to write canvas unittests 2021-05-06 11:22:47 +02:00
Executable_canvasdemo.mk Drop support for OpenGL denylist on X11 2022-03-28 14:31:07 +02:00
IwyuFilter_canvas.yaml Recheck modules [a-c]* with IWYU 2022-01-13 08:26:15 +01:00
Library_cairocanvas.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_canvasfactory.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_canvastools.mk add PCHs for canvas/ 2020-10-02 20:39:36 +02:00
Library_directx9canvas.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_gdipluscanvas.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_oglcanvas.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_simplecanvas.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_vclcanvas.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Makefile re-base on ALv2 code. Includes: 2012-10-08 11:36:37 +01:00
Module_canvas.mk gbuild: build static LO / link static executables 2022-01-12 11:12:46 +01:00
Package_opengl.mk GLSL files should go into $(LIBO_ETC_FOLDER)/opengl 2014-10-03 15:00:24 +03:00
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00
README.vars document CANVAS_SPRITE_BOUNDS 2020-02-17 11:41:14 +01:00
StaticLibrary_directxcanvas.mk messing with UNOMINMAX no longer seems to be necessary 2021-05-04 20:02:28 +02:00

UNO-based Graphics Backend

UNO-based graphics backend, lesser impedance to modern graphics APIs than vcl.

The canvas Framework

The canvas framework is the successor of the system GUI and graphics backend VCL. Basic functionality is available, supplying just as much features as necessary to provide a VCL-equivalent feature set (except proper BiDi/CTL support).

The canvas framework consists of the following two modules, canvas and cppcanvas. Additionally, a new generic graphics tooling is used (but not exclusively by the canvas, Armin's drawinglayer module also make use of it), which resides in basegfx.

The UNO API used by the canvas is primarily under css::rendering, with css::rendering::XCanvas being the central interface.

The slideshow Engine

The slideshow engine has replaced the former Impress-embedded presentation framework with a fully independent UNO component, and it is based on the canvas. Some features used there are only available from canvas, like double-buffering, and hardware-accelerated alpha-blending (currently not on all platforms).

Cairo canvas

Cairo canvas is one of backends of canvas component. canvas is mostly used for slideshow rendering and also for emf+ rendering. we hoped it will even be used by drawing layer, but it didn't happen (yet?) for API look at offapi/com/sun/star/rendering/, the implementation is in canvas and cppcanvas modules.

Cairo canvas backend uses Cairo library for rendering. Main advantage is support of alpha transparency and in some cases accelerated rendering.

The backend itself is quite old and stable, not many changes in that area lately, mostly changes for emf+ rendering, communication with vcl and bugfixes

Future Works

Look at Cairo canvas and situation when it is used (mostly slideshow).

TODO

There still might be more cases when we can save some roundtrips when exchanging data with vcl.