private void updatePath() {
    mPath.reset();
    mBorderPath.reset();
    mTempRect.set(getBounds());

    mTempRect.inset(mBorderWidth / 2, mBorderWidth / 2);
    if (mIsCircle) {
      float radius = Math.min(mTempRect.width(), mTempRect.height()) / 2;
      mBorderPath.addCircle(mTempRect.centerX(), mTempRect.centerY(), radius, Path.Direction.CW);
    } else {
      for (int i = 0; i < mBorderRadii.length; i++) {
        mBorderRadii[i] = mRadii[i] + mPadding - mBorderWidth / 2;
      }
      mBorderPath.addRoundRect(mTempRect, mBorderRadii, Path.Direction.CW);
    }
    mTempRect.inset(-mBorderWidth / 2, -mBorderWidth / 2);

    float totalPadding = mPadding + (mScaleDownInsideBorders ? mBorderWidth : 0);
    mTempRect.inset(totalPadding, totalPadding);
    if (mIsCircle) {
      float radius = Math.min(mTempRect.width(), mTempRect.height()) / 2;
      mPath.addCircle(mTempRect.centerX(), mTempRect.centerY(), radius, Path.Direction.CW);
    } else if (mScaleDownInsideBorders) {
      if (mInsideBorderRadii == null) {
        mInsideBorderRadii = new float[8];
      }
      for (int i = 0; i < mInsideBorderRadii.length; i++) {
        mInsideBorderRadii[i] = mRadii[i] - mBorderWidth;
      }
      mPath.addRoundRect(mTempRect, mInsideBorderRadii, Path.Direction.CW);
    } else {
      mPath.addRoundRect(mTempRect, mRadii, Path.Direction.CW);
    }
    mTempRect.inset(-totalPadding, -totalPadding);
  }
Returns the opacity of the final color which would be used for drawing. This has been inspired
by Android ColorDrawable.

@return the opacity
drawee/src/main/java/com/facebook/drawee/drawable/RoundedColorDrawable.java