SlideShare a Scribd company logo
1 of 24
Download to read offline
1 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Vector graphics with a retained mode API
Cedric BAIL – Senior Open Source Engineer
Samsung Research America (Silicon Valley)
cedric@osg.samsung.com
2
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Needs :
A shape objects (could implement line, polygon and more object with it)
Reintroduction of a gradient object
Text drawing following a path helper
Logic to manipulate them for animation on top of those new object
Helper for importing designer recommendation into those description
3
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Let's have some unrealistic goal :
Animation at 60fps
No battery penalty
No memory penalty
Should be done yesterday
4
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Drawing vector graphism
5
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Main difference :
Immediate rendering API: Skia, Cairo
Retained rendering API: Enesim
Retained vs Immediate :
Remember information between frame (span computation, ...)
Can do damage region (reduce amount of pixels to screen)
Can compute some of the information at the same time as evas_render
Basically one is nice for a scenegraph, the other are not
Retained mode vector graphics have inherently more optimization that can be
done and that can be used by a scene graph
For dynamic User interface using vector graphics, especially in the embedded
world, retained API is the only futur proof solution for a scene graph
6
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
7
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Cost of vector graphics :
Computing span lines → heavy CPU, low memory → scale !
No idea about cut out until span lines are computed → scene graph cut
out optimization difficult
Antialiasing complex shape are required
Logic to merge shape together into one texture is complex
Increase of the number of objects on the canvas
Logic for drawing a span is :
• Pick a generator function and a blitting function
• Generate the span content
• Blit the span content on the destination surface
8
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
9
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Existing solution :
Cairo
Skia
Enesim
10
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Cairo
Well known and stable API
Big community
Good build system
Well tested
Known problem
Performance (slower than skia in some case, and not retained)
Problematic API that require backend specific code
Cairo link with all possible backend library
11
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Skia
Sometimes better performance than Cairo
Known issue
Not retained mode
No community
Shitty as hell build system
No concept of stable API (and don't even talk about ABI)
Skia link with all possible backend library
12
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Enesim :
Retained mode API
Good software rasterizer
Extensible
API with some customisation usable by a scenegraph
Known issue :
No community
Link with all possible backend library (No module)
Broken GL rendering (and backend need complete rewrite)
Lack a lot of feature that are already in Evas
Lack of optimization
13
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Solution ?
14
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
None usable for EFL needs as it
Huge amount of work needed in all scenario
Need to do our own work to fit scenegraph needs
No fast path to get usable result
Will require help and team work to get it done
Still a lot of open question and research necessary
15
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Proposal for implementation :
Use code from Enesim rasterizer inside Evas (LGPL v2.1 code)
Make GL backend use software backend to generate a texture with the
polygon as first step
Add shape objects to Evas (make all object inherit from it)
Add tests to expedite
Add “tesselation” code and make a GL backend
Optimize until usable (hope to have a long life)
16
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Anti-aliasing issue !
17
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Solution for antialiasing :
MSAA → What other vector graphics librairies do. Heavy and costly (2x
resolution)
Add manually a transparent starter and finish span to go 100% alpha
→ require to have a smooth rendering logic, doesn't work well with
contiguous object
FXAA → Idea is to detect and mark border area and run a
precalculated blur filter on those pixels, need a post processing
phase
CMAA → An evolution of FXAA concept, a little bit more costly, but less
blurry
18
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
19
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Auto grouping object into a texture :
Usefull for scrolling
Usefull for older computer where geometry are super costly
Usefull to reduce rendering cost of the same area again and again
Solution :
None automatic solution good yet
Currently pushed back in the upper layer with Evas_Map
Need to investigate how web browser do
Maybe group object based on a “virtual” layer and a speed vector
20
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Handling increased number of object :
Evas_Render linearly walk all object of the scenegraph... a few times !
Especially bad is the “active” object array, that is generated by walking
all object on the canvas and then walked over for every object drawn
on scren !
Removing active array and using a walk through bounding box seems
doable and should reduce the massive number of walk.
Should enable evas to scale to a bigger number of objects
21
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Handling vector cut out and precomputing span lines
Span lines computing should be started as soon as possible
Can be offloaded to as many CPU as available as it is a CPU intensive
task and not a memory bound one
Maybe some of the computation can be offloaded to GPU using
OpenCL (Need serious investigation of pro and cons)
Evas needs cut out information... but can't wait for them !
If span lines computation is not done, assume fully transparent
If span lines computation is done, provide a set of tile information
(empty, with alpha, no alpha) assembled at the uper layer
Remember those information for next frame
22
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Conclusion
23
© 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Vector graphics for EFL
Current state of affair for vector graphics in 2014 is quite shameful and
surprising that nobody did really adress it in a generic and efficient
way (If you look at who does implement a scenegraph, you do
understand...).
A lot of work is required to get something useful → do not expect
usable result by tomorrow nor end of the year.
Expect impact on CPU usage → expect performance to be always
below (If you are in a scenario currently below 60fps, it wont get
better)
Expect impact on memory usage.
Expect impact on battery usage.
24 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
Thank you.

More Related Content

Similar to [E-Dev-Day 2014][14/16] Adding vector graphics support to EFL

EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopSamsung Open Source Group
 
EclipseCon Fr 2018 - Modeling tools go up to the cloud…
EclipseCon Fr 2018 - Modeling tools go up to the cloud…EclipseCon Fr 2018 - Modeling tools go up to the cloud…
EclipseCon Fr 2018 - Modeling tools go up to the cloud…melbats
 
Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?Obeo
 
SiriusCon 2021 - Keynote
SiriusCon 2021 - KeynoteSiriusCon 2021 - Keynote
SiriusCon 2021 - Keynotemelbats
 
Comparison of Programming Platforms
Comparison of Programming PlatformsComparison of Programming Platforms
Comparison of Programming PlatformsAnup Hariharan Nair
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !Cédric Brun
 
Sig13 ce future_gfx
Sig13 ce future_gfxSig13 ce future_gfx
Sig13 ce future_gfxCass Everitt
 
About OpenGL and Vulkan interoperability (XDC 2020)
About OpenGL and Vulkan interoperability (XDC 2020)About OpenGL and Vulkan interoperability (XDC 2020)
About OpenGL and Vulkan interoperability (XDC 2020)Igalia
 
Designing a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkDesigning a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkMarco Gaido
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in productionAntoine Sauray
 
PDE2011 pythonOCC project status and plans
PDE2011 pythonOCC project status and plansPDE2011 pythonOCC project status and plans
PDE2011 pythonOCC project status and plansThomas Paviot
 
The Architect's Two Hats
The Architect's Two HatsThe Architect's Two Hats
The Architect's Two HatsBen Stopford
 
Working with the Bing Maps Silverlight Control
Working with the Bing Maps Silverlight ControlWorking with the Bing Maps Silverlight Control
Working with the Bing Maps Silverlight Controlmark mann
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 
Virtual Simulation Of Systems
Virtual Simulation Of SystemsVirtual Simulation Of Systems
Virtual Simulation Of SystemsHites
 
Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...
Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...
Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...Splashtop Inc
 
An overview of the architecture of electron.js
An overview of the architecture of electron.jsAn overview of the architecture of electron.js
An overview of the architecture of electron.jsMoon Technolabs Pvt. Ltd.
 
Hithhiker guide to eclipse presentation frameworks galaxy
Hithhiker guide to eclipse presentation frameworks galaxyHithhiker guide to eclipse presentation frameworks galaxy
Hithhiker guide to eclipse presentation frameworks galaxyglefur
 

Similar to [E-Dev-Day 2014][14/16] Adding vector graphics support to EFL (20)

Duel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & SkiaDuel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & Skia
 
EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the Desktop
 
EclipseCon Fr 2018 - Modeling tools go up to the cloud…
EclipseCon Fr 2018 - Modeling tools go up to the cloud…EclipseCon Fr 2018 - Modeling tools go up to the cloud…
EclipseCon Fr 2018 - Modeling tools go up to the cloud…
 
How Servo Renders the Web
How Servo Renders the WebHow Servo Renders the Web
How Servo Renders the Web
 
Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?
 
SiriusCon 2021 - Keynote
SiriusCon 2021 - KeynoteSiriusCon 2021 - Keynote
SiriusCon 2021 - Keynote
 
Comparison of Programming Platforms
Comparison of Programming PlatformsComparison of Programming Platforms
Comparison of Programming Platforms
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !
 
Sig13 ce future_gfx
Sig13 ce future_gfxSig13 ce future_gfx
Sig13 ce future_gfx
 
About OpenGL and Vulkan interoperability (XDC 2020)
About OpenGL and Vulkan interoperability (XDC 2020)About OpenGL and Vulkan interoperability (XDC 2020)
About OpenGL and Vulkan interoperability (XDC 2020)
 
Designing a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkDesigning a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache Spark
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in production
 
PDE2011 pythonOCC project status and plans
PDE2011 pythonOCC project status and plansPDE2011 pythonOCC project status and plans
PDE2011 pythonOCC project status and plans
 
The Architect's Two Hats
The Architect's Two HatsThe Architect's Two Hats
The Architect's Two Hats
 
Working with the Bing Maps Silverlight Control
Working with the Bing Maps Silverlight ControlWorking with the Bing Maps Silverlight Control
Working with the Bing Maps Silverlight Control
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
Virtual Simulation Of Systems
Virtual Simulation Of SystemsVirtual Simulation Of Systems
Virtual Simulation Of Systems
 
Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...
Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...
Cornell University Uses Splashtop to Deliver 2D/3D Applications using Amazon ...
 
An overview of the architecture of electron.js
An overview of the architecture of electron.jsAn overview of the architecture of electron.js
An overview of the architecture of electron.js
 
Hithhiker guide to eclipse presentation frameworks galaxy
Hithhiker guide to eclipse presentation frameworks galaxyHithhiker guide to eclipse presentation frameworks galaxy
Hithhiker guide to eclipse presentation frameworks galaxy
 

More from EnlightenmentProject

[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)EnlightenmentProject
 
[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)
[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)
[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)EnlightenmentProject
 
[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...
[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...
[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...EnlightenmentProject
 
[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)
[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)
[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)EnlightenmentProject
 
[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)
[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)
[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)EnlightenmentProject
 
[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)
[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)
[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)EnlightenmentProject
 
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)EnlightenmentProject
 
[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)
[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)
[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)EnlightenmentProject
 
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...EnlightenmentProject
 
[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary
[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary	[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary
[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary EnlightenmentProject
 
[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...
[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...
[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...EnlightenmentProject
 
[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...
[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...
[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...EnlightenmentProject
 
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)EnlightenmentProject
 
[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)
[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)
[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)EnlightenmentProject
 

More from EnlightenmentProject (14)

[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
 
[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)
[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)
[E-Dev-Day 2015][4/4] Update on EFL performance benchmarking (Cedric Bail)
 
[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...
[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...
[E-Dev-Day 2015][1/4] Eolian - Past Year Experiences and the Future (Daniel K...
 
[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)
[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)
[KOR][E-Kor-Seminar 2014][8/8] Enlightenment Window Manager (Carsten Haitzler)
 
[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)
[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)
[KOR][E-Kor-Seminar 2014][7/8] Accessibility in EFL (Shinwoo Kim)
 
[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)
[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)
[KOR][E-Kor-Seminar 2014][4/8] Elm Theme Viewer (SeoZ)
 
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
 
[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)
[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)
[KOR][E-Kor-Seminar 2014][1/8] Introduction of EFL and Enlightenment (Hermet)
 
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
 
[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary
[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary	[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary
[E-Dev-Day 2014][5/16] C++ and JavaScript bindings for EFL and Elementary
 
[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...
[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...
[E-Dev-Day 2014][4/16] Review of Eolian, Eo, Bindings, Interfaces and What's ...
 
[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...
[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...
[E-Dev-Day-US-2015][9/9] High Level Application Development with Elua (Daniel...
 
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
 
[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)
[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)
[E-Dev-Day-US-2015][6/9] Wayland - What's up upstream? (Bryce Harrington)
 

Recently uploaded

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

[E-Dev-Day 2014][14/16] Adding vector graphics support to EFL

  • 1. 1 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Vector graphics with a retained mode API Cedric BAIL – Senior Open Source Engineer Samsung Research America (Silicon Valley) cedric@osg.samsung.com
  • 2. 2 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Needs : A shape objects (could implement line, polygon and more object with it) Reintroduction of a gradient object Text drawing following a path helper Logic to manipulate them for animation on top of those new object Helper for importing designer recommendation into those description
  • 3. 3 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Let's have some unrealistic goal : Animation at 60fps No battery penalty No memory penalty Should be done yesterday
  • 4. 4 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Drawing vector graphism
  • 5. 5 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Main difference : Immediate rendering API: Skia, Cairo Retained rendering API: Enesim Retained vs Immediate : Remember information between frame (span computation, ...) Can do damage region (reduce amount of pixels to screen) Can compute some of the information at the same time as evas_render Basically one is nice for a scenegraph, the other are not Retained mode vector graphics have inherently more optimization that can be done and that can be used by a scene graph For dynamic User interface using vector graphics, especially in the embedded world, retained API is the only futur proof solution for a scene graph
  • 6. 6 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL
  • 7. 7 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Cost of vector graphics : Computing span lines → heavy CPU, low memory → scale ! No idea about cut out until span lines are computed → scene graph cut out optimization difficult Antialiasing complex shape are required Logic to merge shape together into one texture is complex Increase of the number of objects on the canvas Logic for drawing a span is : • Pick a generator function and a blitting function • Generate the span content • Blit the span content on the destination surface
  • 8. 8 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley
  • 9. 9 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Existing solution : Cairo Skia Enesim
  • 10. 10 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Cairo Well known and stable API Big community Good build system Well tested Known problem Performance (slower than skia in some case, and not retained) Problematic API that require backend specific code Cairo link with all possible backend library
  • 11. 11 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Skia Sometimes better performance than Cairo Known issue Not retained mode No community Shitty as hell build system No concept of stable API (and don't even talk about ABI) Skia link with all possible backend library
  • 12. 12 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Enesim : Retained mode API Good software rasterizer Extensible API with some customisation usable by a scenegraph Known issue : No community Link with all possible backend library (No module) Broken GL rendering (and backend need complete rewrite) Lack a lot of feature that are already in Evas Lack of optimization
  • 13. 13 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Solution ?
  • 14. 14 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL None usable for EFL needs as it Huge amount of work needed in all scenario Need to do our own work to fit scenegraph needs No fast path to get usable result Will require help and team work to get it done Still a lot of open question and research necessary
  • 15. 15 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Proposal for implementation : Use code from Enesim rasterizer inside Evas (LGPL v2.1 code) Make GL backend use software backend to generate a texture with the polygon as first step Add shape objects to Evas (make all object inherit from it) Add tests to expedite Add “tesselation” code and make a GL backend Optimize until usable (hope to have a long life)
  • 16. 16 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Anti-aliasing issue !
  • 17. 17 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Solution for antialiasing : MSAA → What other vector graphics librairies do. Heavy and costly (2x resolution) Add manually a transparent starter and finish span to go 100% alpha → require to have a smooth rendering logic, doesn't work well with contiguous object FXAA → Idea is to detect and mark border area and run a precalculated blur filter on those pixels, need a post processing phase CMAA → An evolution of FXAA concept, a little bit more costly, but less blurry
  • 18. 18 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL
  • 19. 19 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Auto grouping object into a texture : Usefull for scrolling Usefull for older computer where geometry are super costly Usefull to reduce rendering cost of the same area again and again Solution : None automatic solution good yet Currently pushed back in the upper layer with Evas_Map Need to investigate how web browser do Maybe group object based on a “virtual” layer and a speed vector
  • 20. 20 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Handling increased number of object : Evas_Render linearly walk all object of the scenegraph... a few times ! Especially bad is the “active” object array, that is generated by walking all object on the canvas and then walked over for every object drawn on scren ! Removing active array and using a walk through bounding box seems doable and should reduce the massive number of walk. Should enable evas to scale to a bigger number of objects
  • 21. 21 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Handling vector cut out and precomputing span lines Span lines computing should be started as soon as possible Can be offloaded to as many CPU as available as it is a CPU intensive task and not a memory bound one Maybe some of the computation can be offloaded to GPU using OpenCL (Need serious investigation of pro and cons) Evas needs cut out information... but can't wait for them ! If span lines computation is not done, assume fully transparent If span lines computation is done, provide a set of tile information (empty, with alpha, no alpha) assembled at the uper layer Remember those information for next frame
  • 22. 22 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Conclusion
  • 23. 23 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Vector graphics for EFL Current state of affair for vector graphics in 2014 is quite shameful and surprising that nobody did really adress it in a generic and efficient way (If you look at who does implement a scenegraph, you do understand...). A lot of work is required to get something useful → do not expect usable result by tomorrow nor end of the year. Expect impact on CPU usage → expect performance to be always below (If you are in a scenario currently below 60fps, it wont get better) Expect impact on memory usage. Expect impact on battery usage.
  • 24. 24 © 2014 SAMSUNG Electronics Co.Open Source Group – Silicon Valley Thank you.