Semantics for 2D Rasterization
Bhargav Kulkarni, Henry Whiting, Pavel Panchekha

TL;DR
This paper introduces $b$Skia, a formal semantics for the Skia graphics library, enabling verification and optimization of rasterization code, resulting in significant speedups on real-world web graphics.
Contribution
It provides a formal, mechanized semantics for Skia, identifies sub-optimal patterns in Chrome, and develops a verified optimizer that improves rasterization performance.
Findings
18.7% average speedup on top 100 websites
Optimizer applies patterns in under 32 microseconds
Verified correctness of replacements in Lean
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 operations that they ask these libraries to perform. Even Google Chrome, a highly optimized program 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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputer Graphics and Visualization Techniques · Interactive and Immersive Displays · Data Visualization and Analytics
