Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/react-native/React/Views/RCTBorderDrawing.m
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,12 @@ static CGPathRef RCTPathCreateOuterOutline(BOOL drawToEdge, CGRect rect, RCTCorn

const CGSize size = makeStretchable ? (CGSize){
// 1pt for the middle stretchable area along each axis
edgeInsets.left + 1 + edgeInsets.right,
edgeInsets.top + 1 + edgeInsets.bottom
// we also need to round the edge insets to avoid border bleeding
// this is because if the size is decimal, when calculating the unit
// rectangle for CALayer.contentsCenter we encounter rounding errors
// which causes visual glitches
ceil(edgeInsets.left) + 1 + ceil(edgeInsets.right),
ceil(edgeInsets.top) + 1 + ceil(edgeInsets.bottom),
} : viewSize;

UIGraphicsImageRenderer *const imageRenderer =
Expand Down
Loading