Create manager to track OffscreenCanvasSurfaceImpl instances
OffscreenCanvasSurfaceManager is a singleton in browser UI thread to keep track
of OffscreenCanvasSurfaceImpl instances (which connects to renderer/main thread).
Each instance corresponds to one single pair of html canvas
and its transferred OffscreenCanvas in renderer process and is therefore
identified by a unique FrameSinkId.
The manager is lazily created. It is useful in two cases:
(1) managing the situation of multiple html canvases that have transferred
(2) allowing the OffscreenCanvasCompositorFrameSink instance (which connects to
OffscreenCanvas on renderer/worker) to connect to its counterpart
OffscreenCanvasSurfaceImpl; this is to facilitate OffscreenCanvas resizing workflow
implementation in next CLs.
7 files changed