A modern 2D graphics library October 14th, 2014 Eduardo Lima Mitev - - PowerPoint PPT Presentation

a modern 2d graphics library
SMART_READER_LITE
LIVE PREVIEW

A modern 2D graphics library October 14th, 2014 Eduardo Lima Mitev - - PowerPoint PPT Presentation

Introduction to A modern 2D graphics library October 14th, 2014 Eduardo Lima Mitev elima@igalia.com What is Skia? What is Skia? A library for drawing 2D Text, Geometries and Images What is Skia? Focus on accurate, high quality and high


slide-1
SLIDE 1

A modern 2D graphics library

Introduction to

Eduardo Lima Mitev

elima@igalia.com

October 14th, 2014

slide-2
SLIDE 2

What is Skia?

slide-3
SLIDE 3

A library for drawing 2D Text, Geometries and Images

What is Skia?

slide-4
SLIDE 4

Focus on accurate, high quality and high performance rendering

What is Skia?

slide-5
SLIDE 5

Cross-platform: Linux, Android, ChromeOS, Mac, Windows, ...

What is Skia?

and hardware architectures too: x86, x86_64, ARMv7, AArch64, MIPS, ...

slide-6
SLIDE 6

Open source, licensed under the New BSD free software license

What is Skia?

slide-7
SLIDE 7

Figure 1. Skia in the software stack

Skia in a typical software stack

slide-8
SLIDE 8

Originally developed by Skia, Inc, acquired by Google in 2005, then released as open source

History

slide-9
SLIDE 9

Sponsored and managed by Google ever since

History

slide-10
SLIDE 10

Cairo, QPainter (Qt), Direct2D, Cocoa Drawing

Similar projects

slide-11
SLIDE 11

Why should I care?

Lets hold on this one for a while...

slide-12
SLIDE 12

Who uses Skia?

slide-13
SLIDE 13

Who uses Skia?

Android Chromium Chrome Firefox Firefox OS

slide-14
SLIDE 14

Combined user-base could be above 1.5 billion

Who uses Skia?

slide-15
SLIDE 15

How Skia works?

slide-16
SLIDE 16

(Figure 2. High level architecture)

How Skia works?

slide-17
SLIDE 17
  • Raster
  • OpenGL (ES)
  • PDF
  • XPS
  • Picture

Skia backends

slide-18
SLIDE 18

API overview

slide-19
SLIDE 19

SkCanvas: main drawing API (drawRect, drawText, drawLine, drawPath, etc)

API overview

slide-20
SLIDE 20

SkPaint: encapsulates styling of draw calls (color, path style, blending mode, font, etc)

API overview

slide-21
SLIDE 21

SkDevice: abstracts the backend (SkBitmapDevice, SkGpuDevice, SkPDFDevice, etc)

API overview

slide-22
SLIDE 22

SkPicture, SkPicturePlayback: records and replay draw operations

API overview

slide-23
SLIDE 23

Main features

slide-24
SLIDE 24

Linear transforms and perspective (3x3 matrices)

Main features

slide-25
SLIDE 25

Shaders, xfermodes, mask filters, path effects

Main features

slide-26
SLIDE 26

Antialiasing, transparency, filters

Main features

slide-27
SLIDE 27

Deferred drawing (SkDeferredCanvas, SkPicture)

Main features

slide-28
SLIDE 28

Subpixel text rendering

Main features

slide-29
SLIDE 29

Ganesh: the OpenGL(ES) backend

slide-30
SLIDE 30

Backend where most of the work is currently focused

Ganesh: the OpenGL(ES) backend

slide-31
SLIDE 31

Accelerates 2D Canvas in Chromium/Chrome and Firefox

Ganesh: the OpenGL(ES) backend

slide-32
SLIDE 32

Expected to accelerate full web content rendering in the future

Ganesh: the OpenGL(ES) backend

slide-33
SLIDE 33

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)

slide-34
SLIDE 34

Performance

slide-35
SLIDE 35

Performance

Great tools available:

  • Benchmarks in Skia repository under /bench
  • Skia-telemetry
  • skiaperf.com
  • Chromium/Chrome’s about:tracing can also help
slide-36
SLIDE 36

Performance

Lack of public benchmarks against similar libraries

slide-37
SLIDE 37

The future of Skia

slide-38
SLIDE 38

Roadmap

Backend work:

  • Enhance PDF for Android and Chrome
  • Many GPU backend changes
slide-39
SLIDE 39

Roadmap

Platform support:

  • C++11 enablement
  • GLSL ES 3.0
slide-40
SLIDE 40

Roadmap

APIs and New Features:

  • Shareable pictures across process boundaries
  • sRGB support, in partnership with Chrome
slide-41
SLIDE 41

Roadmap

Dev and Test Infrastructure:

  • New correctness testing framework
  • More frequent recapturing of web archives for

buildbot and cluster telemetry testing

slide-42
SLIDE 42

Contributing to Skia

slide-43
SLIDE 43

Three well defined roles: developer, contributor, committer

Contributing to Skia

slide-44
SLIDE 44

Report bugs to the issue tracker

Contributing to Skia

slide-45
SLIDE 45

Test: try Skia in your platform/hardware. Feed back!

Contributing to Skia

slide-46
SLIDE 46

Contribute code: fix bugs, implement features in the roadmap

Contributing to Skia

beginners, look for issues tagged GoodFirstBug

slide-47
SLIDE 47

Benchmark: compare Skia perf against other libraries in your platform/hardware; publish results!

Contributing to Skia

slide-48
SLIDE 48

https://sites.google.com/site/skiadocs/

For references and more info:

slide-49
SLIDE 49

Q & A

Thank you!