Closed jezell closed 3 weeks ago
Thanks for the report. I see that using canvaskit and wrapping child: HtmlElementView.fromTagName(
with Container
gives below result:
While without Container
, it shows as below:
With html renderer, it gives above result with and without Container.
+1 I was wondering why the official documentation was letting me down. https://docs.flutter.dev/platform-integration/web/initialization#initializing-the-engine
I also found the original issue on this matter: Maximum number of active HtmlElementView in CanvasKit [WEB] #113699
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
Create more than 8 overlay groups. Later groups will silently fail to render.
Expected results
Allow increasing the number of overlay groups, also don't stop rendering the platform views.
Actual results
You can't increase the number of overlay groups anymore and you can very easily run out of overlay groups.
When the single overlay context commit was merged, we lost the ability to increase the number of overlay layers.
Before this commit:
https://github.com/flutter/engine/commit/6c164f02958c3543c9debbe3072c327f1e3d695d
We could increase the number of layers using canvasKitMaximumSurfaces. However, this configuration option was removed despite it still being needed for anyone running into the maximum overlay surfaces limit. This configuration option should be brought back so that the limit can be increased manually.
Unfortunately, none of the library authors, including the official video plugin have moved to using
createImageFromImageBitmap
so people still need a way to work around the overlay limits until libraries get around to reducing the number of layers that they waste.Also, should probably log some kind of warning when it hits the limit.
Code sample
This code will fail to render the overlays properly:
This code will work, note that simply wrapping the elements in a container breaks them:
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
Doctor output
```console [Paste your output here] ```