Skip to content

Commit dc97df1

Browse files
RSNarafacebook-github-bot
authored andcommitted
Delete RCTFloorPixelValue
Summary: This is dead code. Let's remove this for now. This api is unsafe: if it's called from a non-ui thread, it may dispatch to the ui thread synchronously. Changelog: [iOS][Removed] - Remove RCTFloorPixelValue Reviewed By: NickGerleman Differential Revision: D72260694 fbshipit-source-id: d032917643c957a395ee380ef925a047abd5dace
1 parent 61bd649 commit dc97df1

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

packages/react-native/React/Base/RCTUtils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ RCT_EXTERN CGSize RCTViewportSize(void);
5858
// Round float coordinates to nearest whole screen pixel (not point)
5959
RCT_EXTERN CGFloat RCTRoundPixelValue(CGFloat value);
6060
RCT_EXTERN CGFloat RCTCeilPixelValue(CGFloat value);
61-
RCT_EXTERN CGFloat RCTFloorPixelValue(CGFloat value);
6261

6362
// Convert a size in points to pixels, rounded up to the nearest integral size
6463
RCT_EXTERN CGSize RCTSizeInPixels(CGSize pointSize, CGFloat scale);

packages/react-native/React/Base/RCTUtils.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,6 @@ CGFloat RCTCeilPixelValue(CGFloat value)
395395
return ceil(value * scale) / scale;
396396
}
397397

398-
CGFloat RCTFloorPixelValue(CGFloat value)
399-
{
400-
CGFloat scale = RCTScreenScale();
401-
return floor(value * scale) / scale;
402-
}
403-
404398
CGSize RCTSizeInPixels(CGSize pointSize, CGFloat scale)
405399
{
406400
return (CGSize){

0 commit comments

Comments
 (0)