Flutter Engine
The Flutter Engine
|
Public Member Functions | |
FlutterRenderer | getAttachedRenderer () |
void | attachToRenderer (@NonNull FlutterRenderer renderer) |
void | detachFromRenderer () |
void | pause () |
void | resume () |
Owns a Surface
that FlutterRenderer
would like to paint.
RenderSurface
is responsible for providing a Surface
to a given
when requested, and then notify that
FlutterRendererFlutterRenderer
when the
changes, or is destroyed.
Surface
The behavior of providing a Surface
is delegated to this interface because the timing of a Surface
's availability is determined by Android. Therefore, an accessor method would not fulfill the requirements. Therefore, a RenderSurface
is given a
, which the
FlutterRendererRenderSurface
is expected to notify as a Surface
becomes available, changes, or is destroyed.
Definition at line 24 of file RenderSurface.java.
void io.flutter.embedding.engine.renderer.RenderSurface.attachToRenderer | ( | @NonNull FlutterRenderer | renderer | ) |
Instructs this RenderSurface
to give its Surface
to the given
so that Flutter can paint pixels on it.
FlutterRenderer
After this call, RenderSurface
is expected to invoke the following methods on FlutterRenderer
at the appropriate times:
FlutterRenderer#startRenderingToSurface(Surface, boolean)
FlutterRenderer#surfaceChanged(int, int)
} FlutterRenderer#stopRenderingToSurface()
Implemented in io.flutter.embedding.android.FlutterImageView.
void io.flutter.embedding.engine.renderer.RenderSurface.detachFromRenderer | ( | ) |
Instructs this RenderSurface
to stop forwarding Surface
notifications to the FlutterRenderer
that was previously connected with attachToRenderer(FlutterRenderer)
.
This RenderSurface
should also clean up any references related to the previously connected FlutterRenderer
.
Implemented in io.flutter.embedding.android.FlutterImageView.
FlutterRenderer io.flutter.embedding.engine.renderer.RenderSurface.getAttachedRenderer | ( | ) |
Returns the FlutterRenderer
that is attached to this RenderSurface
, or null if no FlutterRenderer
is currently attached.
Implemented in io.flutter.embedding.android.FlutterImageView.
void io.flutter.embedding.engine.renderer.RenderSurface.pause | ( | ) |
Instructs this RenderSurface
to stop forwarding Surface
notifications to the FlutterRenderer
that was previously connected with attachToRenderer(FlutterRenderer)
.
Implemented in io.flutter.embedding.android.FlutterImageView.
void io.flutter.embedding.engine.renderer.RenderSurface.resume | ( | ) |
Instructs this RenderSurface
to resume forwarding Surface
notifications to the FlutterRenderer
that was previously connected with attachToRenderer(FlutterRenderer)
.
Implemented in io.flutter.embedding.android.FlutterImageView.