Skip to content

SubmitFrame() should take the root surface frame instead of the Skia canvas #58286

@blasten

Description

@blasten

Currently, SubmitFrame() only submits the frame for overlay surfaces on iOS. However, the background canvas is also mutated in this method. This requires a GL/Metal context switches from background -> overlay -> background surface. However, this isn't possible with the EGL API.

The proposed change is to pass background_frame to SubmitFrame() directly. However, this currently creates a circular dependency. To solve this issue, SurfaceFrame should be put into its own surface_frame.* file.

This way this can be done:

-embedder->SubmitFrame(gr_context, background_frame->SkiaCanvas());
+embedder->SubmitFrame(gr_context, background_frame);

Another alternative is to do a more complex refactor and pass background_frame to SubmitFrame directly. However, this creates a circular dependency currently.

Metadata

Metadata

Assignees

Labels

engineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions