public interface RenderSurface
FlutterRendererwould like to paint.
RenderSurface is responsible for providing a
Surface to a given
FlutterRenderer when requested, and then notify that
FlutterRenderer when the
Surface changes, or is destroyed.
The behavior of providing a
Surface is delegated to this interface because the timing
Surface's availability is determined by Android. Therefore, an accessor method would
not fulfill the requirements. Therefore, a
RenderSurface is given a
FlutterRenderer, which the
RenderSurface is expected to notify as a
becomes available, changes, or is destroyed.
|Modifier and Type||Method and Description|
@Nullable FlutterRenderer getAttachedRenderer()
FlutterRendererthat is attached to this
RenderSurface, or null if no
FlutterRendereris currently attached.
void attachToRenderer(@NonNull FlutterRenderer renderer)
RenderSurfaceto give its
Surfaceto the given
FlutterRendererso that Flutter can paint pixels on it.
After this call,
RenderSurface is expected to invoke the following methods on
FlutterRenderer at the appropriate times:
RenderSurfaceto stop forwarding
Surfacenotifications to the
FlutterRendererthat was previously connected with
RenderSurface should also clean up any references related to the previously