Class CompositorController

Object
org.mozilla.geckoview.CompositorController

@UiThread public final class CompositorController extends Object
  • Method Details

    • addDrawCallback

      public void addDrawCallback(@NonNull Runnable callback)
      Add a callback to run when drawing (layer update) occurs.
      Parameters:
      callback - Callback to add.
    • removeDrawCallback

      public void removeDrawCallback(@NonNull Runnable callback)
      Remove a previous draw callback.
      Parameters:
      callback - Callback to remove.
    • 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

      @Nullable public Runnable getFirstPaintCallback()
      Get the current first paint callback.
      Returns:
      Current first paint callback or null if not set.
    • setFirstPaintCallback

      public void setFirstPaintCallback(@Nullable Runnable callback)
      Set a callback to run when a document is first drawn.
      Parameters:
      callback - First paint callback.