Subcompositor support in KWin
ClosedPublic

Authored by graesslin on Apr 1 2016, 8:10 AM.

Details

Reviewers
sebas
Group Reviewers
Plasma
Summary

A sub-surface changed in a way which needs a repaint. Of course only
if the surface is mapped.

Make Scene::Window::window() and WindowPixmap::toplevel() const

No need to have them not const.

Add support for SubSurface to WindowPixmap

This change introduces a tree for WindowPixmap. A WindowPixmap can
have a parent WindowPixmap and children. Each child represents a
SubSurface and references the buffer of that SubSurface.

The tree of WindowPixmaps is updated each time updateBuffer is called.
If there are new SubSurfaces new WindowPixmaps are created, for removed
SubSurfaces the old WindowPixmap gets removed. Also the ordering is
updated to reflect the current state.

This is currently rather expensive and should be changed to only rebuild
the tree if it actually changed.

Add a SurfaceInterface *WindowPixmap::surface() const

Convenience method to get the Surface for a WindowPixmap which is either
the toplevel's surface or a SubSurface.

Use new surface() method in WindowPixmap::updateBuffer

Render child WindowPixmap in SceneQPainter

The rendering is done in a recursive way. For updating the buffer an
important change is done: the buffer is copied into a new QImage on each
change and the differences are no longer painted. This is due to damage
region in a sub-surface tree being basically unknown.

Create sub OpenGLWindowPixmap for sub-surfaces

Properly update EGL Texture for sub-surface buffers

We need to use the tracked damage instead of Toplevel's damage.

Render sub-surfaces in OpenGL compositor

This is more a hack than an actual implementation. It just renders
all sub-surfaces after the main window got rendered. But it does not:

  • use window quads (e.g. splitting not supported)
  • is not combined with rendering of the main surface
  • does not support previous pixmap

Still it renders, which is the main goal at the moment.

Announce support for subcompositor protocol

Diff Detail

Repository
R108 KWin
Branch
subcompositor-arc
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin updated this revision to Diff 3055.Apr 1 2016, 8:10 AM
graesslin retitled this revision from to Consider change in sub-surface tree as a full damage.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptApr 1 2016, 8:10 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.Apr 4 2016, 12:04 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Apr 4 2016, 12:04 PM
graesslin closed this revision.Apr 7 2016, 11:11 AM