Introduction to Skia: The Graphics Engine Behind Everything
The Problem
Rendering 2D graphics across different platforms is a mess. Windows has Direct2D. macOS has Quartz. Linux has Cairo. Mobile platforms have their own thing. Writing graphics code that works everywhere means either maintaining separate implementations or accepting lowest-common-denominator features.
Chrome faced this in 2008. Firefox faced it. Android faced it. Every cross-platform project faces it.
Why Skia Exists
Skia Graphics Library was created by Skia Inc. in the early 2000s. Google acquired it in 2005, used it internally, then open-sourced it in 2008 under the New BSD license.
The timing matters. Chrome launched in 2008. Google needed a graphics backend that worked identically on Windows, Mac, and Linux. Existing options (Cairo, GDI+, CoreGraphics) were platform-specific or feature-limited.
Skia solved this by implementing everything in software with hardware acceleration where available. One codebase. Consistent rendering. All platforms.
What Skia Actually Is
Skia is a 2D graphics library written in C++. It provides:
- Path rendering (lines, curves, fills, strokes)
- Text layout and rendering
- Image codecs (PNG, JPEG, WebP)
- GPU acceleration (OpenGL, Vulkan, Metal, Direct3D)
- Effects (blur, matrix filters, gradients)
- Canvas abstraction
Think of it as a complete 2D rendering stack that sits between your application code and the GPU/framebuffer.
Who Uses Skia
Billions of devices. Not exaggerating.
- Google Chrome & ChromeOS: Every webpage you view
- Android: System UI and all graphics rendering
- Firefox & Firefox OS: Web rendering
- Flutter: Cross-platform UI framework
- Figma (partially): Advanced graphics algorithms
- And many more
If you've used the internet in the last decade, you've used Skia. You just didn't know it.
Why Skia is the Best Option Today
1. Battle-Tested at Scale
Skia powers Chrome. Chrome has 3+ billion users. When 3 billion people use your graphics library daily across thousands of device types, you find and fix every edge case.
2. Feature Complete
Skia has everything:
- Sub-pixel anti-aliasing
- Complex path operations (union, intersect, difference)
- Advanced text shaping with HarfBuzz
- Color management and HDR support
- Hardware-accelerated effects
- Advanced blend modes
Other libraries have some of these. Skia has all of them.
3. Performance
Skia uses GPU when available, CPU fallback when not. It caches aggressively. Path rasterization is highly optimized. Text rendering uses sophisticated hinting.
The team optimizes for real-world workloads, not benchmarks.
4. Active Development
Skia isn't legacy. Google employs a full-time team. They ship updates constantly. New GPU backends (Metal, Vulkan, Dawn). New features (paragraph layout, variable fonts). Bug fixes.
Check the commit log. Multiple commits per day. Every day. For years.
5. Cross-Platform Reality
Write once, render identically:
- Windows (Direct3D, OpenGL, Vulkan)
- macOS (Metal, OpenGL)
- Linux (OpenGL, Vulkan)
- Android (OpenGL ES, Vulkan)
- iOS (Metal)
- Web (WebGL, WebGPU via CanvasKit)
Not "mostly the same." Pixel-identical. The test suite enforces this.
What Skia Doesn't Do
Skia is not a game engine. It's 2D-focused. No 3D transforms, no scene graphs, no physics.
Skia is not a UI framework. It draws primitives. You build the UI layer on top.
Skia is not beginner-friendly. The C++ API is powerful but low-level. Memory management is manual. Lifetimes matter.
The Cost of Power
Skia gives you complete control. That means you need to understand:
- Coordinate spaces and transforms
- Paint semantics (blend modes, filters)
- Path winding rules
- GPU resource management
- When to clip, when to mask, when to layer
This isn't HTML Canvas where you call fillRect() and magic happens. You're dealing with the actual rendering pipeline.
But that's why professional tools use Skia. When you need control, you need Skia.
A Brief History
2005: Google acquires Skia Inc. 2008: Skia open-sourced, powers Chrome at launch 2009: Android adopts Skia for system graphics 2013: Firefox switches from Cairo to Skia 2015: Google announces Flutter, built on Skia 2019: Skia adds WebAssembly build (CanvasKit) 2020s: Graphite project begins (next-gen GPU backend)
Nearly 20 years of development. Still accelerating.
Alternatives and Why They Fall Short
Cairo: Older, less actively maintained, no GPU acceleration for many features Direct2D: Windows-only, no cross-platform story Core Graphics: Apple-only Qt: Complete but heavyweight, brings entire framework HTML Canvas: Limited API, no advanced features
For serious 2D graphics that needs to work everywhere, there's Skia. Then there's compromise.
What This Series Covers
We built a Figma-like vector graphics renderer on Skia. We hit every edge case. We made every mistake. We learned what works.
This series documents:
- What Skia gives you (and what it doesn't)
- Where the APIs are incomplete (and how we filled gaps)
- How to use it on the web (CanvasKit and its quirks)
- Performance pitfalls (we found them all)
- Real implementation details (actual code, not theory)
Next article: CanvasKit—bringing Skia to the web, for better or worse.
Further Reading
- Skia official site: https://skia.org
- Source code: https://skia.googlesource.com/skia
- Architecture docs: https://skia.org/docs/dev/design/
- Why Chrome chose Skia (2008): Historical perspective on cross-platform graphics
Read next: CanvasKit: Skia Meets WebAssembly