EFL on Wayland Rafael Antognolli October, 22th - 2013 Wayland - - PowerPoint PPT Presentation

efl on wayland
SMART_READER_LITE
LIVE PREVIEW

EFL on Wayland Rafael Antognolli October, 22th - 2013 Wayland - - PowerPoint PPT Presentation

EFL on Wayland Rafael Antognolli October, 22th - 2013 Wayland Simpler replacement for X Core protocol + extensions Weston is the reference compositor Toolkits (EFL, Qt, GTK) implement the client API EFL Enlightenment


slide-1
SLIDE 1

EFL on Wayland

Rafael Antognolli

October, 22th - 2013

slide-2
SLIDE 2

Wayland

  • Simpler replacement for X
  • Core protocol + extensions
  • Weston is the reference compositor
  • Toolkits (EFL, Qt, GTK) implement the client API
slide-3
SLIDE 3

EFL – Enlightenment Foundation Libraries

  • Base libraries of Enlightenment 0.17 (soon 0.18)
  • Yet another toolkit library, just like Qt and GTK
  • Split among several libraries/modules:
  • Evas
  • Ecore
  • Elementary
  • Edje, Eina, Emotion...
slide-4
SLIDE 4

What's a Wayland Backend?

  • In other words, why we need a Wayland backend? We need it to:
  • Create Wayland windows
  • Draw widgets into those windows
  • Expose Wayland-specific APIs
  • In summary: it allows us to run EFL applications on Wayland
slide-5
SLIDE 5

EFL – Wayland Architecture

slide-6
SLIDE 6

Work against a moving target

  • Wayland started in 2008
  • Became freedesktop.org project in October, 2010
  • EFL backend started in 2011
  • Initial SHM backend in December, 14th 2011
  • First Wayland release (0.85) in February, 2012
  • Wayland 1.0 released in October, 2012
slide-7
SLIDE 7

Frame sync

  • Frame callback from Wayland
  • Avoid unnecessary repaints
  • Avoid blocking the mainloop
  • Avoid tearing, sync with display update
  • Implemented in SHM backend first, EGL backend a few months later
slide-8
SLIDE 8

SHM triple-buffering

  • Wayland_SHM engine rewrite
  • Buffer management moved to Evas engine
  • Better organization: swapper, buffer and engine
slide-9
SLIDE 9

Client-side decorations: introduction

  • Client renders title bar, buttons and borders
  • Content must be shifted
  • Decorations and content cannot overlap
slide-10
SLIDE 10

Client-side decorations: first solution

  • Objects moved by an offset
  • Master clipper for client area
  • Window decorations added
slide-11
SLIDE 11

1

Client-side decorations: Elementary layouts

  • Several bugs related to CSD
  • Fix one case, breaks another one
  • Elementary will handle all of that for us
slide-12
SLIDE 12

2

Client-side decorations: Elementary layouts

  • Several bugs related to CSD
  • Fix one case, breaks another one
  • Elementary will handle all of that for us
  • Breaks non-elementary apps
slide-13
SLIDE 13

3

Client-side decorations: crazy proposal

  • Using an Ecore_Evas inside another Ecore_Evas
  • Would fix non-elementary apps
  • Fix all the problems in the world
slide-14
SLIDE 14

4

Client-side decorations: render offset and no clipper

  • New proposal: put offsets down in the render tree
  • Affects every Evas object
  • Needs changes to input coordinates
  • Needs changes to window decorations
slide-15
SLIDE 15

5

Client-side decorations: render offset and no clipper

  • New proposal: put offsets down in the render tree
  • Affects every Evas object
  • Needs changes to input coordinates
  • Needs changes to window decorations
  • Ended up bringing back the clipper
slide-16
SLIDE 16

6

Multi-touch

  • Code was there already, not tested
  • Bugs were found after testing
  • Needed hardware
  • Developed with ssh + borrowed laptop
slide-17
SLIDE 17

7

Input Methods

  • Openismus added Input Method support on Wayland
  • Submitted patches for EFL and IBus too
  • Eduardo (Etrunko) polished and integrated them
slide-18
SLIDE 18

8

Window/Surface Rotation

  • Simply were not implemented
  • Copy & paste code from X11 backends
  • Not using buffer transforms yet
slide-19
SLIDE 19

9

Surfaces

  • Just like “windows” in X11
  • Rectangular area, with position, size and pixel contents
  • Managed by the compositor
  • Support different types of rendering:
  • Rendered in a SHM buffer
  • Directly with EGL
slide-20
SLIDE 20

Subsurfaces

  • Always placed relatively to the main surface
  • Can be updated in sync with the main surface
  • Uses:
  • Faster video decoding
  • Offload compositing work from clients to compositor
  • Allows to pass buffer (YUV) processing to dedicated overlay hardware
  • Popups
  • Surface is not limited to the main surface area
slide-21
SLIDE 21

1

Subsurfaces – main features

  • Sharing API with X11 backends
  • Video_Surface API
  • Auto-detection/usage of subsurfaces
  • API exposed – highly customizable use
slide-22
SLIDE 22

2

Subsurfaces - autodetection

  • For a specific image object, use subsurfaces “when possible”
  • Some checks are done on the image:
  • The image is not being clipped
  • The image is not being scaled
  • The image remains inside the main surface area
  • Other conditions might be specified or relaxed later
  • If conditions are not met, use a pixel buffer as fallback
  • Seamless transition to/from subsurface
slide-23
SLIDE 23

3

Drag'n Drop and Copy'n Paste

  • CnP fully functional
  • DnD functional inside the same window
  • Still needs a common API for Wayland and X
slide-24
SLIDE 24

4

Future Plans

  • Need more common APIs:
  • DnD, CnP, window handling
  • More subsurface features as they become available
  • A common “surface layer” that abstracts the underlying backend
  • Video backends of Emotion (video library) must use subsurfaces
slide-25
SLIDE 25

5

Questions?

  • Contact:
  • IRC: #wayland-efl @ freenode
  • https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
  • http://www.enlightenment.org/
  • rafael.antognolli@intel.com