Jason Simmons 6674f823cf Clear the surface to transparent black when creating a PlatformViewWrapper (flutter/engine#52047)
Without this, an opaque black surface may briefly flash onscreen when the platform view is shown (see internal issue b/332379081)

This matches the behavior used before to the introduction of PlatformViewRenderTarget in b3945f7706

That commit moved the clearing of the surface into SurfaceTexturePlatformViewRenderTarget.  But that caused surface clearing to happen in scenarios where there was no PlatformViewWrapper, resulting in the issue seen in https://github.com/flutter/flutter/issues/141068

Later the surface clearing was removed from SurfaceTexturePlatformViewRenderTarget, causing the flashing black screen.
2024-04-11 22:05:33 +00:00
..