1 96 Tizen Graphics UI Frameworks Embedded Software
1 96 Tizen: Graphics & UI Frameworks Embedded Software Lab. @ SKKU
Contents 2 96 • EFL(Enlightenment Foundation Library) – – – Ecore Evas Edje Elementary Cserve 2 • Window Systems – X Window System – Wayland Embedded Software Lab. @ SKKU
Tizen Graphics & UI Frameworks • UI Frameworks – Modules to implement interactive GUI – EFL(Elementary/Ecore), OSP, GTK, Qt – Input Service Framework(ISF), Voice Framework • Graphics Libraries – Modules to render graphic objects – Evas, Cairo, Open. GL ES, EGL • Window Systems – Modules to manage windows and frame buffers – X Window System, Wayland Embedded Software Lab. @ SKKU 3 96
Tizen Graphics & UI Frameworks • Frameworks for UI of core applications & web applications Embedded Software Lab. @ SKKU 4 96 Deprecated (Bada App FW)
5 96 EFL (Enlightenment Foundation Library) Embedded Software Lab. @ SKKU
Enlightenment • Started from a desktop window manager – Default window manager of Bodhi Linux Embedded Software Lab. @ SKKU 6 96
Enlightenment Foundation Library 7 • A set of libraries supporting Enlightenment – Enlightenment 0. 17(E 17) • Components are divided by functions – – Event loop: Ecore Rendering engine: Evas UI: Edje, Elementary, … UI builder tools: Enventor, Eflete, ELM Theme Editor • EFL in Present – Core components of Tizen Graphics/UI framework – 26% of code is E 17, the other is EFL Embedded Software Lab. @ SKKU 96
EFL in Tizen 8 96 Core Applications Elementary Ecore Edje Evas Eet Eina freetype 2 fontconfig Cairo Open. GL ES/EGL Input Service Framework & Voice Framework X Window System Linux Kernel Frame Buffer Input Devices H/W Legend Applications Window System Graphics ISF& Voice FW H/W kernel / Frame Buffer/ Input Devices Embedded Software Lab. @ SKKU EFL & fonts
Immediate vs. Retained Mode (1/2) 9 • Immediate Mode Graphics System – Application directly re-paints its portion that is invalidated – Application re-issues all drawing commands to describe the entire scene each time a new frame is required – GTK+ 3, GDI+ Application 1. Invalidate 2. Expose GTK+/GDK-X 11 3. Drawing Window System Graphics Card Frame Buffer for Screen Embedded Software Lab. @ SKKU 96
Immediate vs. Retained Mode (2/2) 10 96 • Retained Mode Graphics System – The graphics system is responsible for rendering the drawing objects given by application. – Application passes drawing objects to graphics system. – Evas, GTK+ 4(Clutter), WPF Application Evas objects Expose X Window System Evas Rendering Engine (Graphics system) Graphics Card Framebuffer for screen Embedded Software Lab. @ SKKU
Why is EFL used on Tizen? (1/3) • High performance – Retained mode graphics system – 60 fps+ on general smartphones • Fit for Low-end Hardware – Small memory, no swap, no GPUs – Open. GL is not worth for all cases • Texture keeps speed, but loses memory • Support for HW rendering – Open. GL ES – SIMD vector(MMX, Neon) Embedded Software Lab. @ SKKU 11 96 Desktop Environment Memory Used (Mi. B) Enlightenment 0. 18. 8 83. 8 LXDE 0. 5. 5 87. 0 XFCE 4. 10. 2 110. 0 LXQt 0. 7. 0 113. 0 MATE 1. 8. 1 123. 0 Cinnamon 2. 2. 13 176. 3 GNOME 3 3. 12. 2 245. 3 KDE 4. 13. 1 302. 6 Unity 7. 2. 0. 14 312. 5
Why is EFL used on Tizen? (2/3) 12 • Various back-end engine – X 11 (~Tizen 2. 2. 1), Wayland (Tizen 3. 0~) – Direct Frame Buffer, DRM, Memory buffers, PS 3 Native, Windows (GDI & Direct. Draw), … • UI Scalability – Various resolutions (WVGA ~ XQXGA) with the same layout and resources Scale factor: 0. 6 0. 8 1. 0 Embedded Software Lab. @ SKKU 96
Why is EFL used on Tizen? (3/3) • GUI, Logic separation • Themes – A preset package containing graphical appearance details • Bindings – Basically C-based – EFL is also binded to Javascript, C++, Python, Ruby, Perl … – Eo: Generic object model Embedded Software Lab. @ SKKU 13 96
EFL Shortcomings • Entry barrier – Unfamiliar development style – Lack of documentations, developers • No object-oriented implementation – C-based – Eo project is ongoing • Incomplete C++ support – Eolian based E++ project ongoing • No thread safe Embedded Software Lab. @ SKKU 14 96
Tizen Rendering Path 3 D App EFL App. Open. GL ES/EGL EFL EVAS 15 96 Composite Window Manager Open. GL ES/EGL Video App. EFL X window server MM FW EFL win Textures Open. GL ES win Frame Buffer Video win Legend 3 D App. EFL App. Multimedia App. Process Texture Mem. Open. GL ES/EGL Rendering pipeline path; rendering data flow Embedded Software Lab. @ SKKU Configurable Enable/disable Texture from Pixmap
Rendering Path on SW Backend 16 96 Elementary Edje Ecore Evas Ecore X Evas software backend LCD controller xlib X shared Mem. X Server Update window areas Frame buffer 60 Hz Embedded Software Lab. @ SKKU
Rendering Path on GLES Backend 17 96 Elementary Edje Evas Ecore Evas Open. GL ES backend Open. GL ES Ecore X back co EG ntr L olle Open. GL ES H/W d by EGL for X LCD controller xlib front Double buffer X Server Update window area Frame buffer /dev/fb 1 Embedded Software Lab. @ SKKU 60 Hz
EFL Components: Core • Ecore (E + Core) – Event loop library with convenience modules • Evas (E + can. VAS) – Canvas & rendering library • Edje – Complex graphical design & layout library • Elementary – Widget set Embedded Software Lab. @ SKKU 18 96
EFL Components: Others • Eo 19 96 • Edbus – Generic object model for binding other languages • Eina – Library for data types • Eet – Data codec and storage • Efreet – Freedesktop. org standards support – Wrapper of Dbus • Emotion – Video/Audio Playback library • Eio – Asynchronous I/O • Eeze – Udev hardware detection • Ethumb – Thumbnailer & cacher Embedded Software Lab. @ SKKU
20 96 EFL: Ecore The core loop of EFL applications Embedded Software Lab. @ SKKU
Ecore 21 96 • The core loop of EFL application, event & marshaling library – Provides glue to other subsystems – Supports various display system • X 11, FB, Wayland, Win 32, Win. CE, etc. • Features: – – Networking & IPC Threading & inter-thread communication Evas input feeding and output driving More. . . Embedded Software Lab. @ SKKU
Simple EFL Application 22 96 • elm_main() – Main function of EFL application – After initialization, enter into event loop. On exiting window, it also exits Ecore event loop Elementary UI configuration (Elementary Window) Start Ecore main loop! Finalization process like freeing resource Embedded Software Lab. @ SKKU
Ecore Main Loop (1/2) • ecore_main_loop_begin() – The wrapper of Ecore main loop – Ecore main loop and Glib main loop can be chosen. Ecore main loop Glib main loop Embedded Software Lab. @ SKKU 23 96
Ecore Main Loop (2/2) • _ecore_main_loop_iterate_internal() – The implementation of Ecore main loop – It starts all the timer handler, event handler, rendering in an application. Embedded Software Lab. @ SKKU 24 96
Ecore: Usage of Ecore Events • Key down event Ecore_Event_Handler *handler; handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, func, data); Eina_Bool func(void *data, int type, void *event_info) { if (…) return ECORE_CALLBACK_DONE; return ECORE_CALLBACK_PASS_ON; } • Timer event Ecore_Timer *timer; double time; timer = ecore_timer_add(time, func, data); Eina_Bool func(void *data) { if (…) return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_CANCEL; } Embedded Software Lab. @ SKKU 25 96
26 96 EFL: Evas Canvas & Rendering Library Embedded Software Lab. @ SKKU
Evas 27 96 • Canvas & Rendering Library • Features – Retained mode rendering • Controls rendering behavior in the unit of primitive objects and smart objects. – Scene graph • Tracks the status of objects → minimizes rendering behavior. – Multiple output paths • Pure software/Open. GL ES – Rendering optimization • 3 D H/W Acceleration, SIMD vector operations – Provides GL Glue Layer Embedded Software Lab. @ SKKU
Evas: Retained Mode Rendering • Evas uses retained mode rendering – Application sends Evas objects to Evas. – Evas does rendering based on Evas objects. Application Evas objects Expose X Window System Evas Rendering Engine (Graphics system) Graphics Card Framebuffer for screen Embedded Software Lab. @ SKKU 28 96
Evas Objects 29 • All Objects Displayed on Canvas – Controlled by Evas_Object handles. • Loading fonts and images, rendering glyphs and images, scaling, blending, 3 D transformation etc. – Evas manages all Evas objects equally. • Type of Evas Object – Primitive objects: minimum unit of Evas rendering • Rectangle, Line, Polygon, Textblock, Textgrid, Image – Smart objects • Box, Grid, Table, Customized smart objects(ELM Widgets) Embedded Software Lab. @ SKKU 96
Evas Primitive Objects • Rendering units of Evas Embedded Software Lab. @ SKKU 30 96
Evas Smart Objects 31 • Evas objects composed of primitive objects – Acts as a group. – Evas object generic functions also can be used. Embedded Software Lab. @ SKKU 96
Image Native Surface 32 96 Evas Runtime Evas_Object_Rect Hello World! Evas_Object_Text … GL Rendering Engine X 11 Output Evas Engine Module Evas_Object_Image Buffer Output … … Open. GL App (surface_a ie. Pixmap or texture) SW Rendering Engine X 11 Rendering Engine SDL Output Evas_Object_Image (img_obj_a) evas_object_image_native_surface_set(img_obj_a, surface_a) Embedded Software Lab. @ SKKU Output
Evas: Scene Graph 33 96 • Scene graph – A structure that arranges the logical representation of a graphical scene – General data structure in GUI applications • Scene graph in Evas – Manages Evas objects in graph data structure. – Tracks all the objects’ status and gets changed area in the next frame → Minimizes rendering area. Embedded Software Lab. @ SKKU
Evas: Minimizing Rendering Region • Start Here Embedded Software Lab. @ SKKU 34 96
Evas: Minimizing Rendering Region • Next frame is… Embedded Software Lab. @ SKKU 35 96
Evas: Minimizing Rendering Region • Calculate actual update region deltas Embedded Software Lab. @ SKKU 36 96
Evas: Minimizing Rendering Region • Only draw updated regions Embedded Software Lab. @ SKKU 37 96
Evas: Rectangle Example 38 /* Build by $ gcc evas_rectangle. c -o evas_rectangle `pkg-config --cflags --libs ecore-evas` */ #include <Ecore. h> #include <Ecore_Evas. h> int main(int argc, char **argv) { Ecore_Evas *ee; Evas *evas; Evas_Object *bg; if(ecore_evas_init() <= 0) return 1; ee = ecore_evas_new(NULL, 0, 0, 200, NULL); ecore_evas_show(ee); evas = ecore_evas_get(ee); // Get the Ecore_Evas's Evas object. bg = evas_object_rectangle_add(evas); // Add a rectangle to the given Evas object. evas_object_color_set(bg, 255, 255); // Set the color of the given Evas object to the given one. evas_object_move(bg, 0, 0); // Move the given Evas object to the given location inside its canvas' viewport. evas_object_resize(bg, 200); // Change the size of the given Evas object. evas_object_show(bg); // Make the given Evas object visible. ecore_main_loop_begin(); ecore_evas_free(ee); ecore_evas_shutdown(); } return 0; Embedded Software Lab. @ SKKU 96
Evas: Image Example 39 /* Build by $ gcc evas_image. c -o evas_image `pkg-config --cflags --libs ecore-evas` */ #include <Ecore. h> #include <Ecore_Evas. h> int main(int argc, char **argv) { Ecore_Evas *ee; Evas *evas; Evas_Object *bg; if(ecore_evas_init() <= 0) return 1; ee = ecore_evas_new(NULL, 0, 0, 200, NULL); ecore_evas_show(ee); evas = ecore_evas_get(ee); // Get the Ecore_Evas's Evas object. bg = evas_object_image_filled_add(evas); // Add an image to the given Evas object. evas_object_image_file_set(img, “test. png”, NULL); // Set the image file path of the given Evas object. evas_object_move(img, 0, 0); // Move the given Evas object to the given location inside its canvas' viewport. evas_object_resize(img, 200); // Change the size of the given Evas object. evas_object_show(img); // Make the given Evas object visible. ecore_main_loop_begin(); ecore_evas_free(ee); ecore_evas_shutdown(); } return 0; Embedded Software Lab. @ SKKU 96
40 96 EFL: Edje Complex graphical design & layout library Embedded Software Lab. @ SKKU
Edje 41 96 • Complex graphical design & layout library • EDC script – GUI layout description separated from application code – Can be changed at or during runtime – Compiled as binary code(edj) • Description about: – Images, colors, positioning, animations, behaviors, … Embedded Software Lab. @ SKKU
Edje: Edc & Edj • Separation of layout and logic – Graphical part: GUI Layout binary (edj) – Functionality: Executable logic binary (C) • Utility – edje_cc : compile edc to edj – edje_decc : de-compile edj to edc Embedded Software Lab. @ SKKU 42 96
Edje: Relation with Evas, Ecore Embedded Software Lab. @ SKKU 43 96
Edje: EDC Script Embedded Software Lab. @ SKKU 44 96
Edje: EDC Script Embedded Software Lab. @ SKKU 45 96
Edje: Simple Example part { name: “background”; type: RECT; mouse_events: 0; description { state: “default” 0. 0; color: 255 255; } } part { name: “blue_rect”; type: RECT; mouse_events: 1; description { state: “default” 0. 0; color: 0 0 255; rel 1 { relative: 0. 1; } rel 2 { relative: 0. 3; } } } Embedded Software Lab. @ SKKU 46 96
Edje: Simple Example part { name: “red_rect”; type: RECT; mouse_events: 0; description { state: “default” 0. 0; color: 255 0 0 255; rel 1 { to: “blue_rect”; relative: 0 2; } rel 2 { to: “blue_rect”; relative: 1 3; } } } description { state: “down” 0. 0; inherit: “default” 0. 0; rel 1. relative: 3 2; rel 2. relative: 4 3; color: 255 0 0 0; } Embedded Software Lab. @ SKKU 47 96
Edje: Simple Example program { name: “blue_rect. clicked”; signal: “mouse, clicked, 1”; source: “blue_rect”; action: STATE_SET “down” 0. 0; transition: ACCELERATE 0. 5; target: “red_rect”; after: “red_rect. restore”; } program { name: “red_rect. restore”; action: STATE_SET “default” 0. 0; target: “red_rect”; } Embedded Software Lab. @ SKKU 48 96
49 96 EFL: Elementary A set of widgets Embedded Software Lab. @ SKKU
Elementary 50 96 • A Set of Widgets – 약 80여 개 – Containers: Box, Conformant, Grid, Layout, Panes, Scroller, Table, … – Non-Containers: Bg, Button, Check, Entry, Label, List, Icon, Win, . . . • Features: – Fast, Finger friendly, Scalability, Themes – Widget hierarchy, Dynamic language change < Scaled and resized relative to the screen> < Same view but different themes> Embedded Software Lab. @ SKKU
Elementary Widgets • Various Widgets clock 51 96 radio segment control photo, photocam entry actionslider check slider flipselector notify menu bg frame colorselector diskselector index bubble separator panel Label map thumb fileselector multibuttonentry ctxpopup panes glview Embedded Software Lab. @ SKKU toolbar
Elementary Widgets • Naviframe – Switching multiple pages with stack • Toolbar – List of Items Embedded Software Lab. @ SKKU 52 96
Elementary Widgets • Entry – Text input field – Copy & paste, various modes (password, multiline, . . . ) • Genlist – Generic List – Flexible but complex to use Embedded Software Lab. @ SKKU 53 96
Elementary: Widget Hierarchy 54 • Widgets are built in a hierarchical fashion. • Widget shares it’s functions(APIs) with child widget. Embedded Software Lab. @ SKKU 96
Elementary: Scalability • UI Scalability – Relative Positioning – Scale Factor Embedded Software Lab. @ SKKU 55 96
Elementary: Theme • Theme can be changed in same layout Embedded Software Lab. @ SKKU 56 96
Elementary: Dynamic Language Change 57 • Elementary provides utility APIs for multi language support Embedded Software Lab. @ SKKU 96
Elementary: Dynamic Language Change Embedded Software Lab. @ SKKU 58 96
GUI Tools for Customizing Layout • Enventor: Dynamic EDC Editor • Eflete: EFL Edje Theme Editor • ELM Theme Viewer: Elementary Theme Viewer Embedded Software Lab. @ SKKU 59 96
60 96 Cserve 2 Optimization of EFL Embedded Software Lab. @ SKKU
Cserve 2: Motivation 61 • Duplicated Resource Problem in EFL – Most images and fonts used in a theme are used by multiple applications at the same time – EFL contains a variety of caches and • Images, fonts, . . . • Objectives of Cserve 2: – Reduce memory consumption by sharing – Optimize load time by pre-loading data Embedded Software Lab. @ SKKU 96
Cserve 2 62 96 • Sharing image and font data between EFL application processes – Started by Pro. Fusion at 2012 • Cache server – Loads images and fonts – Shares resources across applications • EFL applications – – Connect to the server via UNIX socket Send requests and wait for answers Don't load anything on their own Keep local cache pointing to shared data Embedded Software Lab. @ SKKU
Cserve 2 63 96 Embedded Software Lab. @ SKKU
Cserve 2: Shared Indexing 64 • Problems on Cserve 2 – IPC overheads: • messages over socket link • context switches, read, write, . . . – Clients do not know the server's cached data before sending a request • Solution – Expose indexes of shared objects to all clients • via /dev/shm – Clients scan the tables and don't wait for the server's response when the data is already loaded Embedded Software Lab. @ SKKU 96
Cserve 2: Shared Indexing • 3 types of objects: – Data (image data) • Stored in separate shm files: “img” – Fixed-size arrays of objects • Indexes • Stored in “array” files – Variable-size pools of objects • So-called “mempools” • Indexed by offset + length in a separate array Embedded Software Lab. @ SKKU 65 96
Cserve 2: Shared Indexing • Index tables principles – Arrays of simple structures of a single type – Contain: • ID • Refcount • Other fixed-size data (int, bool, . . . ) Embedded Software Lab. @ SKKU 66 96
Cserve 2: Shared Indexing • Strings – Two shm files are used: index and mempool – Mempool contains the strings actual data – Index table contains: • • String ID Refcount Offset (in the mempool) Length • So, we can read a string just knowing its string ID Embedded Software Lab. @ SKKU 67 96
Cserve 2: Image Scaling 68 • Cserve 2 combines image cache and scale cache • Reuse scale cache logic – Minimizes the number of cached scale images. – Scaling process is done on server side. Embedded Software Lab. @ SKKU 96
Cserve 2: Robustness • Cserve 2 image loader crash – No crash on client side (just no data) – New slave spawned • Cserve 2 server crash – enlightenment_start restarts cserve 2 – Clients reconnect to new server • Discard some data • Keep old image references (no need to load) • Cserve 2 shutdown or restart – cleanup /dev/shm/ Embedded Software Lab. @ SKKU 69 96
Cserve 2: Benefits 70 96 • Real Phone Usage – Workload & Environment • 8 threads of “elementary_test -to launcher” on 1280 x 720 screen – Font size • ~24 x 16 (small), ~32 x 24 (normal), ~40 x 30 (large) • In case of normal size, 1 font, 50 characters: 1 x 32 x 24 x 50=37. 5 KB – Icon size • 50 x 50 (small), 100 x 100 (large) in 32 -bit color • For one icon, 4 Bx 50=10 KB (small), 4 Bx 100=40 KB (large) – Border size • width 10 px, length 720 px, 32 -bit color, 2 x • 4 Bx 10 x 720 x 2=56 KB Embedded Software Lab. @ SKKU
Cserve 2: Overhead 71 96 • Overhead – When workload runs with Cserved 2 turned on: 72176 KB • Size of /dev/shm: 4376 KB – When Cserve 2 quits: 66716 KB – Total overhead: 72176 KB– 66716 KB– 4376 KB=1084 KB • Conclusion: – Cserve 2 saves memory as soon as 1 MB of data can be shared(fonts & images). • Refer to “Cserve 2: Shared cache subsystem of Evas”. Embedded Software Lab. @ SKKU
72 96 Tizen Window Systems: X Window Systems Embedded Software Lab. @ SKKU
X Window System 73 96 • History – X window system is made by MIT in 1984. – X 11: the current protocol version, established in 1987. – X. org server: the current reference implementation developed by the X. Org Foundation • Designed to be used over network connections • Features – – – Event Driven Network Transparent Device Independent Policy Independent Extensible Embedded Software Lab. @ SKKU
X Window System: Architecture (1) • Client-server Model – X client is linked with X server through the X protocol translated by Xlib. – X client • Sends graphical request • Gets user input. • Ecore and Evas in Tizen – X server • Accepts request for graphical output • Sends back user input Embedded Software Lab. @ SKKU 74 96
X Window System: Architecture (2) • Client-server Architecture of X System Embedded Software Lab. @ SKKU 75 96
X Protocol 76 96 • Protocol about communication with X clients and the X server • Features: – Object-based – Asynchronous • Types of Messages: – – Request (Client → Server) Reply Event (Server → Client) Error Embedded Software Lab. @ SKKU
X Server 77 96 • Handles Output & Input Processes • Manages a Screens and Input Devices • Layered Structure – DIX Layer, DDX Layer, OS Layer, Extension Layer • Resource – – Everything in X Server controlled through “resources” Created on demand Used by clients to request operations Screens, windows, graphic contexts, pixmaps, regions, colormaps, fonts, cursors Embedded Software Lab. @ SKKU
X Server 78 96 • Layered Structure: – DIX Layer, DDX Layer, OS Layer, Extension Layer Embedded Software Lab. @ SKKU
X Server 79 96 • DIX(Device Independent X) Layer – Interface between X Clients and DDX/extensions • DDX(Device Dependent X) Layer – Deals with graphic and input hardware • OS Layer – Client connection management, work scheduling, memory allocation routines • Extension Layer – Enables to get additional functionalities for X server Embedded Software Lab. @ SKKU
DIX Layer 80 96 • Interface among DDX/Extensions and X Clients – Delivers requests from clients to DDX/extensions – Sends input events to clients • Dispatch loop – DIX Layer manages requests with dispatch loop • Screens – One for each physical screen – Defines functions used to handle operations on resources – Main communication channel DIX-DDX Embedded Software Lab. @ SKKU
DDX Layer 81 96 • A layer dealing with graphic and input HW • Graphics Output • Input Processing – Mouse movement – Key presses – Key mappings Embedded Software Lab. @ SKKU
DDX Layer: Graphics Output • Pixel-based • Screen – Basic data structure – Manage all resources • Drawables – Pixel data format defined by DDX – Pixmap format constant across screens • XYPixmap -> one bitmap for each plane • Zpixmap -> series of pixel values – Pixel values interpreted at display time – Windows, Pixmaps, … Embedded Software Lab. @ SKKU 82 82 96
DDX Drawables • Windows – Visible rectangle on screen – Border drawn by DDX • Create, move, resize – Contents drawn by client • Server may provide backing store • Bit gravity (resizing) – Clipped by parent and sibbling windows • Pixmaps – Rectangular array of pixel values – Reference counted Embedded Software Lab. @ SKKU 83 96
OS Layer 84 96 • Client Monnection Management • Work Scheduling – It schedules work to be done for clients – Ignore/Attend. Client() • Memory Allocation Routines – Xalloc()/Xrealloc()/Xfree() Embedded Software Lab. @ SKKU
Porting X Server 85 • Code layers – – DIX: Dev. Independent, don’t touch OS: OS specific DDX: Graphics Device specific Extensions: Add features • Porting Layer: OS + DDX • Porting process: – Define functions required by DIX to handle resources Embedded Software Lab. @ SKKU 96
86 96 Tizen Window Systems: Wayland Embedded Software Lab. @ SKKU
Wayland 87 96 • Display management architecture & protocol – – Window management and composition Weston: main open source implementation Maintained by Freedesktop. org Adopted by Tizen 3. 0 • Replacement for X – No rendering API in Wayland • Rendering has already been supported by Evas, Cairo, Open. GL ES – SHM(Shared memory) protocol: support for SW rendering – Less IPC: single process architecture Embedded Software Lab. @ SKKU
Wayland Protocol • Wayland Protocol – Weston compositor interacts with Wayland clients(applications) via Wayland protocol. Embedded Software Lab. @ SKKU 88 96
Tizen Graphic Stack with X. org • EFL and E 17(X compositor) are linked to X. org(X server) via X protocol Embedded Software Lab. @ SKKU 89 96
Tizen Graphic Stack with Wayland • EFL is linked to Weston/E 17 compositor via Wayland protocols Embedded Software Lab. @ SKKU 90 96
Wayland with EFL 91 • Weston provides surface to be rendered to Evas • Weston sends input events to Ecore Embedded Software Lab. @ SKKU 96
Backends of EFL • EFL controls display and input devices through several backends. – Ecore_Evas: Glue to the backends • X Server Backend – Software_X 11, Open. GL_X 11 • Wayland Backend – Wayland_SHM: SW rendering – Wayland_EGL: HW rendering – Ecore_Wayland • Surface Handling and Input Embedded Software Lab. @ SKKU 92 96
Wayland Optimization 93 • Performance of Wayland – 60 FPS(Frames Per Second) – 16 ms for one frame from client to compositor • Visualization Tool: E-Graph – A tool to visualize log information and draw FPS curve – https: //gitorious. org/e-graph Embedded Software Lab. @ SKKU 96
Wayland Optimization 94 • Problem – Rendering when resource is blocked by waiting VSync • Triple Buffering – Add one additional buffer for client and compositor – Before: ~40 fps → After: ~48 fps – Time spend on composition: 13 ms Embedded Software Lab. @ SKKU 96
Wayland Optimization 95 • Problem – Redraw overlapped surface → heavy load during composition • Opaque Region – Overlapped surface, set by Ecore and sent to Weston – Compositing time: ~13 ms → ~5 ms – FPS: 40 fps → 60 fps Embedded Software Lab. @ SKKU 96
References • Tizen Developer Conference 2012 96 96 • Linux. Con # – 2012: E 17 and EFL – 2013: The EFL Toolkit – Creating Fancy UIs with EDJE • EFL Workshop 2012 # – Overview of Graphics and – Tizen Native Display Layer: Input in Tizen Architecture and Usage – Tizen Graphics Core Evas • Tizen Technical and Scene Graph • Tizen Developer Conference 2014 – The Art of Tizen UI Theme Technology in Various Profiles Workshop # • EFL Dev Day 2013 # – Cserve 2: Shared Cache Subsystem for Evas – EFL on Wayland Embedded Software Lab. @ SKKU
- Slides: 96