Lune

OOPSLA2026Top-tier venue

Semantics for 2D Rasterization

Bhargav Kulkarni, Henry Whiting, Pavel Panchekha

Abstract

Rasterization is the process of determining the color of every pixel drawn by an application. Powerful rasterization libraries like Skia, CoreGraphics, and Direct2D put exceptional effort into drawing, blending, and rendering efficiently. Yet applications are still hindered by the inefficient sequences of instructions that they ask these libraries to perform. Even Google Chrome, a highly optimized web browser co-developed with the Skia rasterization library, still produces inefficient instruction sequences even on the top 100 most visited websites. The underlying reason for this inefficiency is that rasterization libraries have complex semantics and opaque and non-obvious execution models. To address this issue, we introduce μSkia, a formal semantics for the Skia 2D graphics library, and mechanize this semantics in Lean. μSkia covers language and graphics features like canvas state, the layer stack, blending, and color filters, and the semantics itself is split into three strata to separate concerns and enable extensibility. We then identify four patterns of sub-optimal Skia code produced by Google Chrome, and then write replacements for each pattern. μSkia allows us to verify that the replacements are correct, including identifying numerous tricky side conditions. We then develop a high-performance Skia optimizer that applies these patterns to speed up rasterization. On 139 Skia programs gathered from the top 100 websites, this optimizer yields a speedup of 1.12× over Skia's most modern GPU backend, while taking just 0.03 ms for optimization. The speedups persist across a variety of websites, Skia backends, and GPUs. To provide true, end-to-end verification, optimization traces produced by the optimizer are loaded back into the μSkia semantics and translation validated in Lean.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Spineless Traversal for Layout Invalidation cites Conflict-Driven Synthesis for Layout Engines
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. Verifying and improving Halide's term rewriting system with program synthesisJulie L. Newcomb, Andrew Adams, Steven Johnson, Rastislav Bodík et al.OOPSLA 2020 · 21 citations
  2. Semantics and Scheduling for Machine Knitting CompilersJenny Lin, Vidya Narayanan, Yuka Ikarashi, Jonathan Ragan-Kelley et al.SIGGRAPH 2023 · 16 citations
  3. Conflict-Driven Synthesis for Layout EnginesJunrui Liu, Yanju Chen, Eric Atkinson, Yu Feng et al.PLDI 2023 · 5 citations
  4. Formalizing Linear Motion G-Code for Invariant Checking and Differential Testing of Fabrication ToolsYumeng He, Chandrakana Nandi, Sreepathi PaiOOPSLA 2025 · 2 citations
  5. Spineless Traversal for Layout InvalidationMarisa Kirisame, Tiezhi Wang, Pavel PanchekhaPLDI 2025

Related papers

  1. GraphFuzz: Library API Fuzzing with Lifetime-aware Dataflow GraphsHarrison Green, Thanassis AvgerinosICSE 2022 · 38 citations
  2. Automated Deep Learning Optimization via DSL-Based Source Code TransformationRuixin Wang, Minghai Lu, Cody Hao Yu, Yi-Hsiang Lai et al.ISSTA 2024 · 1 citation
  3. Uniformity Analysis in the WebGPU Shading LanguageJames Lee-Jones, John Wickerson, Alastair F. DonaldsonPLDI 2026 · 1 citation
  4. Lean Finder: Semantic Search for Mathlib That Understands User IntentsJialin Lu, Kye Emond, Kaiyu Yang, Swarat Chaudhuri et al.ICLR 2026 · 10 citations
  5. ImProver: Agent-Based Automated Proof OptimizationRiyaz Ahuja, Jeremy Avigad, Prasad Tetali, Sean WelleckICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines