Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Introduction to Skia. A Modern 2D Graphics Library (ELCE 2014)

2.436 visualizaciones

Publicado el

By Eduardo Lima.

While user experiences are increasingly moving to 3D, rendering of 2D content remains at the core of how we interact with computer applications today. Skia is an open-source project maintained by Google whose goal is to bring the best 2D graphics library to a variety of targets, from mobile to desktop and embedded. Skia is used in highly popular projects like Mozilla Firefox, the Chromium browser and Android.

This talk will introduce Skia to developers and users, giving an overview of its design, architecture and features. It will also discuss briefly how hardware acceleration improves performance of Skia in the context of new devices, form-factors and the industry shift to mobile; with focus set on Linux and Android platforms.

Publicado en: Tecnología
  • Sé el primero en comentar

Introduction to Skia. A Modern 2D Graphics Library (ELCE 2014)

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