blob: 2b293a244abf5ac8f0abad68089cc35e36d9d33b [file] [log] [blame]
reedde330ff2014-11-02 19:19:34 -08001Skia Update
2
reed7b864662014-11-04 13:24:47 -08003Skia : Access
Thiago Farina4c93a122015-02-03 13:12:54 -02004- https://skia.org
5- https://skia.googlesource.com/skia
reed7b864662014-11-04 13:24:47 -08006
reedde330ff2014-11-02 19:19:34 -08007Skia : Overview
reed7b864662014-11-04 13:24:47 -08008- portable graphics engine
9- 2D transformations + perspective
10- primitives: text, geometry, images
11- effects: shaders, filters, antialiasing, blending
reedde330ff2014-11-02 19:19:34 -080012
13Skia : Porting
14- C++ and some SIMD assembly
reedbb8a0ab2014-11-03 22:32:07 -080015- Fonts : CoreText, FreeType, GDI, DirectWrite
reedde330ff2014-11-02 19:19:34 -080016- Threads : wrappers for native apis
17- Memory : wrappers for [new, malloc, discardable]
18
reed7b864662014-11-04 13:24:47 -080019Skia : Backends
20- Surface
21-- raster : ARGB, RGB16, A8 in software
22-- gpu : transcribe to OpenGL
23- Document
24-- transcribe to PDF or XPS
25- Record and Playback
26-- Picture
27-- Pipe
28
reedbb8a0ab2014-11-03 22:32:07 -080029Skia : Clients
30- Blink : under the GraphicsContext hood
31- Chrome : ui/gfx and compositor
reed7b864662014-11-04 13:24:47 -080032- Android : framework
reedbb8a0ab2014-11-03 22:32:07 -080033- third parties : e.g. Mozilla
reedde330ff2014-11-02 19:19:34 -080034
reedbb8a0ab2014-11-03 22:32:07 -080035Skia In Blink
reedde330ff2014-11-02 19:19:34 -080036
37Skia In Blink : Fonts
reedbb8a0ab2014-11-03 22:32:07 -080038- SkTypeface and SkFontMgr : platform agnostic
reedde330ff2014-11-02 19:19:34 -080039- Runtime switch between GDI and DirectWrite
reedbb8a0ab2014-11-03 22:32:07 -080040- SkTextBlob to encapsulate runs of text
reedde330ff2014-11-02 19:19:34 -080041- Push LCD decision-making out of Blink
42
43Skia In Blink : Record-Time-Rasterization
reed7b864662014-11-04 13:24:47 -080044- What? : direct rendering during Paint pass
reedde330ff2014-11-02 19:19:34 -080045-- Image scaling, filters
46-- SVG patterns, masks
47- Problematic in modern Blink
48-- CTM not always known/knowable
49-- Rendering backend not always known (gpu or cpu)
50-- Rasterization takes (too much) time
51
52Skia In Blink : RTR response
53- SkImageFilter w/ CPU and GPU implementations
reed7b864662014-11-04 13:24:47 -080054- Bitmap scaling : bilerp, mipmaps, fancy
reedde330ff2014-11-02 19:19:34 -080055- SkPicture for caching SVG
56- SkPicture + saveLayer() for masks
57-- PathOps for resolving complex paths
58- SkPictureShader for device-independent patterns
reedbb8a0ab2014-11-03 22:32:07 -080059
60Skia In Blink : Recording
reed7b864662014-11-04 13:24:47 -080061- GraphicsContext (now) backed by SkPicture
reedbb8a0ab2014-11-03 22:32:07 -080062-- draw commands are recorded for later playback
63-- all parameters must be copied or (safely) ref'd
64-- may record more than is currently visible
65- Resulting picture may be replayed multiple times
reed7b864662014-11-04 13:24:47 -080066-- from different thread(s)
reedbb8a0ab2014-11-03 22:32:07 -080067
68Skia In Blink : Recording response
69- New implementation
70- Optimized for recording speed
71-- shallow copies whenever possible
72-- rearchitect all Skia effects to be immutable
73- Reentrant-safe for playback in multiple threads
74-- also affected effect subclasses
75
76Skia In Blink : Playback
77- Separate pass for optimizations (optional)
78-- peep-holes rewrites
79-- compute bounding-box hierarchy for faster tiling
80-- can be done outside of Blink thread
81- GPU optimizations
82-- layer "hoisting"
reed7b864662014-11-04 13:24:47 -080083-- distance fields : fonts and concave paths
84
85Skia In Blink : multi-picture-draw
86- mpd(canvas[], picture[], matrix[], paint[])
87- Requires independent canvas objects
88-- all other parameters can be shared
89-- draw order is unspecified
90- Examples
91-- 1 picture drawing to multiple tiles (canvases)
92-- multiple pictures each drawing to its own layer
93
94Skia In Blink : MPD optimizations*
95- GPU
96-- "layer hoisting" to reduce rendertarget switching
97-- layer atlasing (also applies to imagefilters)
98-- pre-uploading of textures
99-- atlas yuv (from jpeg) to convert on gpu
100- CPU
101-- parallel execution using thread pool
102-- pre-decoding of images based on visibility
reedbb8a0ab2014-11-03 22:32:07 -0800103
104Skia : Roadmap
105
reed7b864662014-11-04 13:24:47 -0800106Skia : Roadmap - performance
107- GPU
reedbb8a0ab2014-11-03 22:32:07 -0800108-- extended OpenGL features (e.g. geometry shaders)
109-- reordering for increased batching
110-- support for new low-level OpenGL APIs
reed7b864662014-11-04 13:24:47 -0800111- CPU
112-- SIMD applied to floats
113-- smarter culling in pictures
reedbb8a0ab2014-11-03 22:32:07 -0800114
reed7b864662014-11-04 13:24:47 -0800115Skia : Roadmap - API
116- Cross process support
reedbb8a0ab2014-11-03 22:32:07 -0800117- Direct support for sRGB
reedbb8a0ab2014-11-03 22:32:07 -0800118- Robust file format
reed7b864662014-11-04 13:24:47 -0800119- Support PDF viewing
120- Stable C ABI
121-- bindings for JS, Go, Python, Lua
reedbb8a0ab2014-11-03 22:32:07 -0800122
123Demo