Package org.mozilla.geckoview
Class CompositorController
Object
org.mozilla.geckoview.CompositorController
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDrawCallback
(Runnable callback) Add a callback to run when drawing (layer update) occurs.int
Get the current clear color when drawing.Get the current first paint callback.void
onPipModeChanged
(boolean enabled) Should be called when the system informs you of changes to and from picture-in-picture mode.void
removeDrawCallback
(Runnable callback) Remove a previous draw callback.void
setClearColor
(int color) Set the clear color when drawing.void
setFirstPaintCallback
(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.
-