Tizen Window System
-
Upload
eun-young-lee -
Category
Software
-
view
1.114 -
download
2
Transcript of Tizen Window System
Tizen Window System
2016-01-23 Tizen Talks
Gwan-gyeong Mun
Software R&D Center
Samsung Electronics
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 2
AppFramework / UI Framework / WindowSystem
Window System
Display Server + Window Manager + Etc ( Buffer Management , GL Driver …)
Provide Visibility Feature for App Framework’s Life Cyle
Provide Window Resource ( with various WM policy ) for UI Framework
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 3
AppCore with Window Manager
P
P
Window Manager
Send Visibility Event
for Resume State
Feat. 정우현
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 4
EFL with Display Server
Window
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 5
Window Manager Policy
Window Manager
controlls Window
Focus, Size, Stack,
etc…
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 6
EFL / Window System in Tizen
Legend
Applications EFL & fontsWindow System
H/W
Linux Kernel Frame Buffer Input Devices
H/W
fontconfigfreetype2 OpenGL ES/EGL
Eet
Evas
Ecore
Eina
Edje
Elementary
Applications
X / Wayland Window System
InputService
Framework&
Voice Framework
kernel / Frame Buffer/ Input Devices
Graphics
ISF& Voice FW
Cairo
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 7
Android? Tizen?
출처: https://source.android.com/devices/graphics/index.html
Enlightenment
Main Screen Mgr.
wm-policy
Keyrouter
CompWindow Effect
Composition
Enlightenment Foundation Library (EFL)
Ecore Evas
Xlib OpenGL ES / EGL
X Server / DRM TBM
Application
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 8
Tizen Window System
Window Systems
X Window System X Server + Enlightenment (Window Manager, E17)
~ Tizen 2.4
WaylandEnlightenment ( Wayland Display Server, E19)
Tizen 3.0 ~
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 9
Display Server / Window Manager (1)
Display ServerControl Input / Output
Window Manager Window Policy
Window Size, Position, Stack, Visibility, Rotation
Window Compositing
Window Effect, NoComp Feature (HWC)
Etc
KeyRouter, Quickpanel Manager, ANR …
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 10
Display Server / Window Manager (2)
X ( ~Tizen 2.4 )Display Server : X Server
Window Manager: Enlightenment E17, works as X Client.
Wayland (Tizen 3.0 ~)Display Server + Window Manager = Enlightenment E19
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 11
Tizen Graphics Library(EFL) Backend
EFL(Enlightenment Foundation Library)Backend ( X11, Wayland, DRM, Etc… )Ecore
Event loop library with convenience modulesEcore_X11, Ecore_Wayland, Ecore_Drm
Ecore_EvasGlue to the backendsEcore_Evas_X11, Ecore_Evas_Wayland, Ecore_Evas_Drm
EvasCanvas & rendering libraryEvas_X11_Shm, Evas_X11_GL, Evas_Wayland_Shm, Evas_Wayland_Egl, Evas_Drm, Evas_GL_Drm
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 12
X Window System (~Tizen 2.4)
X Software ArchitectureX has the client-server model architecture.
X logically be thought to be two part, the client linked with Xlib called X client and the server which is generally called X server.
X client
Xlib
X server
Network
requests
replies
events
Legend
X client
Xlib
X Server
X protocol
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 13
X Software Architecture (~Tizen 2.4)
Application
Xlib
WindowManager
Xlib
Application
Xlib
Toolkit
X server
Network
Device Drivers
Window Manager
A program written with Xlib. It controls the placement and appearance of
application windows.
X window system protocol requests are
sent from clients.
Events and replies are passed back to clients.
Toolkit
Implements a set of user interface features such as
menus or command buttons.Ex. EFL
Display Server
A program that runs on each system that supports a display.
Display
A workstation consisting of keyboard(s), pointing
devices, and one or more screens.
Xlib
Provides functions for connecting to a display
server, creating windows, drawing graphics,
responding to events, and so on.
Legend
X client
Xlib
Toolkit
X Server
Device drivers X protocol
requests replies
• X Software Architecture in detail
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 14
X Window Manager (~Tizen 2.4)
X Window Manager
Window System 내의 모든 Window 들의 크기, 위치, Stack 을 관리하는 특별한 X application
X Window Manager 종류: Enlightenment, Compiz, Metacity, KWin, Mutter
Enlightenment
Enlightenment Foundation Library (EFL) 을 이용한 X Window Manager.
Window management, Window composition, H/W Key event 관리
Tizen Window Manager
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 15
Tizen Window Manager (Compositing)
Window CompositionWindow Composition 작업을 통해 Screen 출력
Window 상태 변경에 따라 Effect 수행
~ Tizen 2.4 : E17’s module , e-comp-tizen module
Tizen 3.0 ~ : E19, Compositor merged into Enlightenment Core
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 16
Compositing
1
2
3
SCREEN(Phone/TV)
E17
COMP
X
SERVER
E19 Wayland Server
12
3
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 17
Tizen Window Manager (Policy)
Window Layout PolicyApp Window들의 크기, 위치, 스택을 결정 / 관리
Main Screen Manager: Desktop window layout policy 적용
Policy Module: Main Screen Manager 에서 적용한window layout을 Tizen UX 에 적합한 형태로 전환
H/W Key event Delivery PolicyKeyrouter module
여러 H/W key (Volume, Home, Power button) event 관리
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 18
Policy
1
2
3
SCREEN(Phone/TV)
E17
Policy
X
SERVER
E19 Wayland Server
3
2
1
Stack / Size / Position 변경
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 19
Visibility
12
E17
Policy
X
SERVER
E19 Wayland Server
SCREEN
(Phone/TV)
1
2[Visibility State ]
1: Obscured
2: Unobscured
[Window 2 Create / Show]
12
E17
Policy
X
SERVER
E19 Wayland Server
[Visibility State ]
1: Unobscured
2: Obscured
[Window 1 Raise up]
1
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 20
Window Manager Flow ( ~Tizen 2.4)
GPU Device DriverInput Device Driver
Application A
Enlightenment (E17)
Kernel
Legend & Acronym
Application
Enlightenment
Plug-in Module
Process
Plug-in
X Server
policy
X Video Driver
Application B
comp
X Input Driver
keyrouterDrawingWindowCreation
Key Input
Drawing Flow
Window Creation Flow
Key Input Flow
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 21
Window Manager Flow (Tizen 3.0)
GPU Device DriverInput Device Driver
Application A
Enlightenment (E19)
Kernel
policy
Application Bcomp
keyrouterDrawing WindowCreation
Key Input
Legend & Acronym
Application
Enlightenment
Plug-in Module
Process
Plug-in
Drawing Flow
Window Creation Flow
Key Input Flow
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 22
Wayland on Tizen 3.0
X Server
Composite
Window Mng.
Tizen App.
Xlib
Tizen App.
Xlib
Wayland
Compositor
Tizen App.
libwayland
Tizen App.
libwayland
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 23
Wayland?
New-generation Display Server replacement for X Display Server.
Wayland is NOT the Display Server by itself.
it’s just a protocol which can communicate with Compositor and Clients.
Doesn’t have rendering API.
There is NO additional functionality.
Slogan
“Every frame is perfect, by which I mean that applications will be able to control the rendering enough that we’ll never see tearing, lag, redrawing or flicker.”
- by Kristian Høgsberg -
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 24
Why Wayland?
Core is extremely simple and small.
Give more work on Clients.
Smooth resize of the application window by optimized client-side direct rendering and buffer control
Designed to be extendable and avoid round-trips
Easy to extend protocol for mobile, TV and wearable devices
Does not expose any direct client-to-client communication.
except passing file descriptors for selection and D&D data.
Reasons For Moving To Wayland
X Wayland
Rendering Support for H/W Overlay by WM
No Yes
Support for DrawingAPI
Yes No
Input Resource Limitation 255 Keycodes in theory, 232-1
Support for Server-side Input Transform
No Yes
Security Protocol Code Hand written binary protocol parsing code
Generated by wayland-scanner
Input Event Different clients can receive events on the same window and add other events.
Server sends corresponding events to a client.
Extensibility Ease of Porting Hard to adapt Relatively easy
Extension of protocol Hard to add while minimizing impact to existing system functions (DIX, DDX)
Relatively easy
EventSystem
Race condition Client – Server – WM Client – Server (WM)
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 26
Display Buffer Management
Application에 제공되는 Buffer의 생성 주체
X윈도우 버퍼 생성은 X Server가 처리
GL의 경우도 GL Driver 내부에서 X 서버에 요청하여메모리 생성 (정확히는 X Video Driver에서 처리 )
WaylandWindow 에 사용되는 Buffer생성 주체는 클라이언트
GL의 경우에도 Client Side GL Driver가 버퍼 할당
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 27
The Stack of Enlightenment Display Server
Application
X Server (Replaceable)
Operating System
EFL Library
E17 (WM)
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 28
The Stack of Enlightenment Display Server
Application
(Wayland)
Enlightenment 0.19 (Compositor)
EFL Library
Operating System
Application
X Server (Replaceable)
Operating System
EFL Library
E17 (WM)
Copyright © 2016 Samsung Electronics, Co., Ltd. All rights reserved. 29
Repos & Contact
Window System Repos on Tizen 3.0
https://review.tizen.org/git/platform/upstream/enlightenment
https://review.tizen.org/git/platform/core/uifw/e-mod-tizen-wm-policy
https://review.tizen.org/git/platform/upstream/efl
Copyright © 2012 Samsung Electronics, Co., Ltd. All rights reserved. 30
Thank you