Skip to content

Commit

Permalink
opt code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Jul 31, 2024
1 parent a81e6d9 commit 59b4fc1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ ShadowNode::Shared LayoutableShadowNode::findNodeAtPoint(
auto frame = layoutableShadowNode->getLayoutMetrics().frame;
auto isPointInside = false;
auto newPoint = Point();
auto inversionTransform = transform;

// Fast path: Handle horizontal/vertical inversion
if (Transform::isVerticalInversion(transform) ||
Expand Down Expand Up @@ -293,6 +292,7 @@ ShadowNode::Shared LayoutableShadowNode::findNodeAtPoint(
newPoint = point - transformedFrame.origin -
layoutableShadowNode->getContentOriginOffset(false);
} else {
auto inversionTransform = transform;
// Slow path: Handle translation/rotation .. etc.
if (transform.matrix != Transform::Identity().matrix &&
transform.getInversion(inversionTransform)) {
Expand Down

0 comments on commit 59b4fc1

Please sign in to comment.