EPISODE · Oct 10, 2025 · 44 MIN
blink::GraphicsContext
from Blink286 · host Free Debreuil
immediate drawing API that records to a display list. Painters for layout objects use GraphicsContext to “draw”—but in modern Blink those calls get recorded into a display list (PaintRecord) backed by Skia commands. This recording is scoped and batched between BeginRecording(...)/EndRecording(). (Chromium Git Repositories)Key methods (how display items get their pixels)Recording: BeginRecording(const FloatRect&) → sk_sp<PaintRecord> EndRecording() — wraps a run of drawing commands for later replay. (Chromium Git Repositories)Draw ops (representative): DrawRect, DrawImage(...), DrawText(...), BeginLayer/EndLayer — the stuff that becomes Skia ops inside display items. (Chromium Git Repositories)Important fieldscc::PaintCanvas* canvas_ (owned by recorder), PaintRecorder paint_recorder_ — actual recording guts;float device_scale_factor_, state stacks/flags — needed for correct pixel snapping/appearance. (Chromium Git Repositories)Hands off to: PaintController, which packages these recorded ops into chunks/items.
What this episode covers
immediate drawing API that records to a display list. Painters for layout objects use GraphicsContext to “draw”—but in modern Blink those calls get recorded into a display list (PaintRecord) backed by Skia commands. This recording is scoped and batched between BeginRecording(...)/EndRecording(). (Chromium Git Repositories)Key methods (how display items get their pixels)Recording: BeginRecording(const FloatRect&) → sk_sp<PaintRecord> EndRecording() — wraps a run of drawing commands for later replay. (Chromium Git Repositories)Draw ops (representative): DrawRect, DrawImage(...), DrawText(...), BeginLayer/EndLayer — the stuff that becomes Skia ops inside display items. (Chromium Git Repositories)Important fieldscc::PaintCanvas* canvas_ (owned by recorder), PaintRecorder paint_recorder_ — actual recording guts;float device_scale_factor_, state stacks/flags — needed for correct pixel snapping/appearance. (Chromium Git Repositories)Hands off to: PaintController, which packages these recorded ops into chunks/items.
NOW PLAYING
blink::GraphicsContext
No transcript for this episode yet
Similar Episodes
No similar episodes found.
Similar Podcasts
No similar podcasts found.