Files
loongoffice/canvas
Michael Weghorn 46c71f04c9 Drop assert checking address of reference is not nullptr
It was introduced in

    commit 9090dc1f3b27195f5defd35586ac79357992be21
    Date:   Mon Jan 18 18:27:19 2021 +0200

        split OutputDevice from Window

and caused my GCC 10 '--enable-werror' build to fail with

    In file included from /usr/include/c++/10/cassert:44,
                     from .../include/tools/ref.hxx:23,
                     from .../include/vcl/outdev.hxx:24,
                     from .../canvas/source/vcl/impltools.hxx:25,
                     from .../canvas/source/vcl/canvas.hxx:39,
                     from .../canvas/source/vcl/canvas.cxx:22:
    .../canvas/source/vcl/outdevholder.hxx: In constructor ‘vclcanvas::OutDevHolder::OutDevHolder(OutputDevice&)’:
    .../canvas/source/vcl/outdevholder.hxx:38:16: error: the compiler can assume that the address of ‘rOutDev’ will never be NULL [-Werror=address]
       38 |         assert(&rOutDev);
          |                ^~~~~~~~
    cc1plus: all warnings being treated as errors
    make[1]: *** [.../solenv/gbuild/LinkTarget.mk:301: /home/michi/development/git/libreoffice/workdir/CxxObject/canvas/source/vcl/canvas.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    In file included from .../include/comphelper/solarmutex.hxx:25,
                     from .../include/vcl/svapp.hxx:29,
                     from .../canvas/source/vcl/impltools.hxx:24,
                     from .../canvas/source/vcl/spritecanvas.hxx:44,
                     from .../canvas/source/vcl/spritecanvas.cxx:28:
    .../canvas/source/vcl/outdevholder.hxx: In constructor ‘vclcanvas::OutDevHolder::OutDevHolder(OutputDevice&)’:
    .../canvas/source/vcl/outdevholder.hxx:38:16: error: the compiler can assume that the address of ‘rOutDev’ will never be NULL [-Werror=address]
       38 |         assert(&rOutDev);

Change-Id: I9e8ef7e91dba847f4894124348f13755fc620fac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115737
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-05-18 14:39:18 +02:00
..
2021-03-09 06:51:51 +01:00
2021-05-12 21:48:42 +02:00
2021-05-17 12:56:51 +02:00
2020-10-02 20:39:36 +02:00
2020-10-02 20:39:36 +02:00
2020-10-02 20:39:36 +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.