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

    mTempRectangle.inset(mPadding, mPadding);
    if (mType == Type.OVERLAY_COLOR) {
      mPath.addRect(mTempRectangle, Path.Direction.CW);
    }
    if (mIsCircle) {
      mPath.addCircle(
          mTempRectangle.centerX(),
          mTempRectangle.centerY(),
          Math.min(mTempRectangle.width(), mTempRectangle.height()) / 2,
          Path.Direction.CW);
    } else {
      mPath.addRoundRect(mTempRectangle, mRadii, Path.Direction.CW);
    }
    mTempRectangle.inset(-mPadding, -mPadding);

    mTempRectangle.inset(mBorderWidth / 2, mBorderWidth / 2);
    if (mIsCircle) {
      float radius = Math.min(mTempRectangle.width(), mTempRectangle.height()) / 2;
      mBorderPath.addCircle(
          mTempRectangle.centerX(), mTempRectangle.centerY(), radius, Path.Direction.CW);
    } else {
      for (int i = 0; i < mBorderRadii.length; i++) {
        mBorderRadii[i] = mRadii[i] + mPadding - mBorderWidth / 2;
      }
      mBorderPath.addRoundRect(mTempRectangle, mBorderRadii, Path.Direction.CW);
    }
    mTempRectangle.inset(-mBorderWidth / 2, -mBorderWidth / 2);
  }
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
drawee/src/main/java/com/facebook/drawee/drawable/RoundedCornersDrawable.java