@Override
  public boolean setVisible(boolean visible, boolean restart) {
    if (mVisibilityCallback != null) {
      mVisibilityCallback.onVisibilityChange(visible);
    }
    return super.setVisible(visible, restart);
  }
The root drawable of a DraweeHierarchy.

<p>Root drawable has several functions:

<ul>
  <li>A hierarchy always has the same instance of a root drawable. That means that internal
      structural changes within the hierarchy don't require setting a new drawable to the view.
  <li>Root drawable prevents intrinsic dimensions to escape the hierarchy. This in turn prevents
      view to do any erroneous scaling based on those intrinsic dimensions, as the hierarchy is
      in charge of all the required scaling.
  <li>Root drawable is visibility aware. Visibility callback is used to attach the controller (if
      not already attached) when the hierarchy needs to be drawn. This prevents photo-not-loading
      issues in case attach event has not been called (for whatever reason). It also helps with
      memory management as the controller will get detached if the drawable is not visible.
  <li>Root drawable supports controller overlay, a special overlay set by the controller. Typical
      usages are debugging, diagnostics and other cases where controller-specific overlay is
      required.
</ul>
drawee/src/main/java/com/facebook/drawee/generic/RootDrawable.java