Skip to content

[BUG] (Performance) SkSwapChaninPanel makes unnecessary per-frame heap allocations #1251

Open
@akater320

Description

@akater320

SkSwapChainPanel::OnRenderFrame(Rect) makes 2 heap allocations. It would be preferable to not have any allocations in the hot path.

  1. SkAutoCanvasRestore(...), The RAII semantics are neat, but maybe this could be changed to one of the new disposable stack-scoped structs?
  2. Can SKPaintGLSurfaceEventArgs be reused rather than allocated each frame?

using (new SKAutoCanvasRestore(canvas, true))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions