pepper: pepper_plane_t and per-plane damage processing
authorTaekyun Kim <tkq.kim@samsung.com>
Wed, 15 Jul 2015 08:09:16 +0000 (17:09 +0900)
committerGerrit Code Review <root@ap3>
Thu, 16 Jul 2015 05:27:59 +0000 (14:27 +0900)
commit09b7262e124e2f15bbe999575be7bbd1b5aa837d
tree96a4dc048b77dbd47273569b3a660289bc4020d5
parentb693c5ea21a51d9a8b2af079113ae8ff7279dbfe
pepper: pepper_plane_t and per-plane damage processing

Plane is a logical rendering surface maintaing its own damage region. A plane
belongs to an output and a view can be on a plane per output at a time.

<< Overall Data Relationship >>
* Compositor
    - output list
    - view list in sorted z-order

* Output
    - plane list

* Plane
    - plane entry list
    - damage region
    - clip region (obscured by other planes)

* View
    - Geometry (position, size, transform)
    - plane entries

<< Output Repaint Scheduling >>
* surface.commit() causes all outputs to be scheduled to do repaint.
* Repaint is scheduled on an output when one of its plane gets damaged.

<< Output Repaint Process >>
* Update geometry of all views in the compositor.
* Build a list of views that overlap with the output rectangle.
* Ask output backend to assign a plane of each view in the list.
* Build a list of plane entries for the views assigned to each plane.
* Accumulate damage for each plane.
* Call backend.repaint()

<< Damage Processing >>
* Geometry & Z-order change
    - Inflict damage instantly with current visible region of the view on each
      plane where the view belongs to.

    - Mark it as damaged. Damage accumulation function should add visible region
      of damaged views to the planes.

* Plane move
    - Inflict damage instantly on previous plane and mark it as damaged.

* Surface damage
    - Added while accumulating plane damage.

Change-Id: I7c4bd95f439f0cf0356bcbf2f060b09800ea4528
23 files changed:
drm/src/drm-internal.h
drm/src/drm-output.c
fbdev/src/fbdev-internal.h
fbdev/src/fbdev-output.c
pepper/src/Makefile.am
pepper/src/compositor.c
pepper/src/output.c
pepper/src/pepper-internal.h
pepper/src/pepper-output-backend.h [new file with mode: 0644]
pepper/src/pepper.h
pepper/src/plane.c [new file with mode: 0644]
pepper/src/surface.c
pepper/src/view.c
render/src/gl-renderer.c
render/src/pepper-render-internal.h
render/src/pepper-render.h
render/src/pixman-renderer.c
render/src/renderer.c
wayland/src/wayland-internal.h
wayland/src/wayland-output.c
x11/src/x11-common.c
x11/src/x11-internal.h
x11/src/x11-output.c