@Override
    public boolean setVisible(boolean visible, boolean restart) {
        isVisible = visible;
        if (!visible) {
            stopRunning();
        } else if (isStarted) {
            startRunning();
        }
        return super.setVisible(visible, restart);
    }
Clears temporary data and resets the drawable back to the first frame.
core/src/main/java/com/bumptech/glide/load/resource/gif/GifDrawable.java