Package org.mozilla.geckoview
Interface GeckoDisplay.NewSurfaceProvider
- All Known Implementing Classes:
GeckoView
- Enclosing class:
- GeckoDisplay
public static interface GeckoDisplay.NewSurfaceProvider
Interface that allows Gecko the request a new Surface from the application. An implementation
of this should be set on the
GeckoDisplay.SurfaceInfo
object passed to GeckoDisplay.surfaceChanged(SurfaceInfo)
, by using GeckoDisplay.SurfaceInfo.Builder.newSurfaceProvider(NewSurfaceProvider)
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by Gecko to request a new Surface from the application.
-
Method Details
-
requestNewSurface
@UiThread void requestNewSurface()Called by Gecko to request a new Surface from the application.Occasionally the Surface provided to Gecko via
GeckoDisplay.surfaceChanged(SurfaceInfo)
is invalid and Gecko is unable to render in to it. This function will be called in such circumstances. It is the implementation's responsibility to ensure thatGeckoDisplay.surfaceChanged(SurfaceInfo)
gets called soon afterwards with a new Surface, allowing Gecko to resume rendering.Failure to implement this function may result in Gecko either crashing or not rendering correctly should it encounter an invalid Surface.
-