a modern 2d graphics library · 2016-07-06 · a modern 2d graphics library introduction to eduardo...
TRANSCRIPT
![Page 2: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/2.jpg)
What is Skia?
![Page 3: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/3.jpg)
A library for drawing 2D Text, Geometries and Images
What is Skia?
![Page 4: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/4.jpg)
Focus on accurate, high qualityand high performance rendering
What is Skia?
![Page 5: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/5.jpg)
Cross-platform: Linux, Android,ChromeOS, Mac, Windows, ...
What is Skia?
and hardware architectures too:x86, x86_64, ARMv7, AArch64, MIPS, ...
![Page 6: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/6.jpg)
Open source, licensed underthe New BSD free software license
What is Skia?
![Page 7: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/7.jpg)
Figure 1. Skia in the software stack
Skia in a typical software stack
![Page 8: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/8.jpg)
Originally developed by Skia, Inc,acquired by Google in 2005,then released as open source
History
![Page 9: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/9.jpg)
Sponsored and managed by Google ever since
History
![Page 10: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/10.jpg)
Cairo, QPainter (Qt), Direct2D, Cocoa Drawing
Similar projects
![Page 11: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/11.jpg)
Why should I care?Lets hold on this one for a while...
![Page 12: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/12.jpg)
Who uses Skia?
![Page 13: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/13.jpg)
Who uses Skia?
Android Chromium Chrome Firefox Firefox OS
![Page 14: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/14.jpg)
Combined user-base could be above 1.5 billion
Who uses Skia?
![Page 15: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/15.jpg)
How Skia works?
![Page 16: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/16.jpg)
(Figure 2. High level architecture)
How Skia works?
![Page 17: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/17.jpg)
● Raster● OpenGL (ES)● PDF● XPS● Picture
Skia backends
![Page 18: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/18.jpg)
API overview
![Page 19: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/19.jpg)
SkCanvas: main drawing API(drawRect, drawText, drawLine, drawPath, etc)
API overview
![Page 20: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/20.jpg)
SkPaint: encapsulates styling of draw calls (color, path style, blending mode, font, etc)
API overview
![Page 21: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/21.jpg)
SkDevice: abstracts the backend (SkBitmapDevice, SkGpuDevice, SkPDFDevice, etc)
API overview
![Page 22: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/22.jpg)
SkPicture, SkPicturePlayback: records and replay draw operations
API overview
![Page 23: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/23.jpg)
Main features
![Page 24: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/24.jpg)
Linear transforms and perspective(3x3 matrices)
Main features
![Page 25: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/25.jpg)
Shaders, xfermodes, mask filters, path effects
Main features
![Page 26: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/26.jpg)
Antialiasing, transparency, filters
Main features
![Page 27: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/27.jpg)
Deferred drawing (SkDeferredCanvas, SkPicture)
Main features
![Page 28: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/28.jpg)
Subpixel text rendering
Main features
![Page 29: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/29.jpg)
Ganesh: the OpenGL(ES) backend
![Page 30: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/30.jpg)
Backend where most of the work is currently focused
Ganesh: the OpenGL(ES) backend
![Page 31: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/31.jpg)
Accelerates 2D Canvas in Chromium/Chrome and Firefox
Ganesh: the OpenGL(ES) backend
![Page 32: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/32.jpg)
Expected to accelerate full web content rendering in the future
Ganesh: the OpenGL(ES) backend
![Page 33: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/33.jpg)
Some features:
Ganesh: the OpenGL(ES) backend
● Accelerate and combine effects with on-demand shaders
● Batching and merging of draw operations● Geometry shaders● Accelerated path rendering if available
(NV_path_rendering)
![Page 34: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/34.jpg)
Performance
![Page 35: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/35.jpg)
Performance
Great tools available:● Benchmarks in Skia repository under /bench● Skia-telemetry● skiaperf.com
● Chromium/Chrome’s about:tracing can also help
![Page 36: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/36.jpg)
Performance
Lack of public benchmarks against similar libraries
![Page 37: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/37.jpg)
The future of Skia
![Page 38: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/38.jpg)
Roadmap
Backend work:● Enhance PDF for Android and Chrome● Many GPU backend changes
![Page 39: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/39.jpg)
Roadmap
Platform support:● C++11 enablement● GLSL ES 3.0
![Page 40: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/40.jpg)
Roadmap
APIs and New Features:● Shareable pictures across process boundaries● sRGB support, in partnership with Chrome
![Page 41: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/41.jpg)
Roadmap
Dev and Test Infrastructure:● New correctness testing framework● More frequent recapturing of web archives for
buildbot and cluster telemetry testing
![Page 42: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/42.jpg)
Contributing to Skia
![Page 43: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/43.jpg)
Three well defined roles:developer, contributor, committer
Contributing to Skia
![Page 45: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/45.jpg)
Test: try Skia in your platform/hardware. Feed back!
Contributing to Skia
![Page 46: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/46.jpg)
Contribute code: fix bugs, implement features in the roadmap
Contributing to Skia
beginners, look for issues tagged GoodFirstBug
![Page 47: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/47.jpg)
Benchmark: compare Skia perf against other libraries in your platform/hardware; publish results!
Contributing to Skia
![Page 48: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/48.jpg)
https://sites.google.com/site/skiadocs/
For references and more info:
![Page 49: A modern 2D graphics library · 2016-07-06 · A modern 2D graphics library Introduction to Eduardo Lima Mitev elima@igalia.com October 14th, 2014](https://reader034.vdocuments.net/reader034/viewer/2022042419/5f3573b3de99ba393130cafb/html5/thumbnails/49.jpg)
Q & A
Thank you!