Package org.mozilla.geckoview
Class CompositorController
Object
org.mozilla.geckoview.CompositorController
Controller for managing compositor-related functionality.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDrawCallback(Runnable callback) Add a callback to run when drawing (layer update) occurs.intGet the current clear color when drawing.Get the current first paint callback.voidonPipModeChanged(boolean enabled) Should be called when the system informs you of changes to and from picture-in-picture mode.voidremoveDrawCallback(Runnable callback) Remove a previous draw callback.voidsetClearColor(int color) Set the clear color when drawing.voidsetFirstPaintCallback(Runnable callback) Set a callback to run when a document is first drawn.
-
Method Details
-
addDrawCallback
Add a callback to run when drawing (layer update) occurs.- Parameters:
callback- Callback to add.
-
removeDrawCallback
Remove a previous draw callback.- Parameters:
callback- Callback to remove.
-
onPipModeChanged
public void onPipModeChanged(boolean enabled) Should be called when the system informs you of changes to and from picture-in-picture mode.- Parameters:
enabled- True if the activity is in picture-in-picture mode.
-
getClearColor
public int getClearColor()Get the current clear color when drawing.- Returns:
- Curent clear color.
-
setClearColor
public void setClearColor(int color) Set the clear color when drawing. Default is Color.WHITE.- Parameters:
color- Clear color.
-
getFirstPaintCallback
Get the current first paint callback.- Returns:
- Current first paint callback or null if not set.
-
setFirstPaintCallback
Set a callback to run when a document is first drawn.- Parameters:
callback- First paint callback.
-