Skip to content

fix(replay): Use global visible rect when text layout is not laid out in Compose #4361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 28, 2025

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Apr 25, 2025

📜 Description

When a Text component does not specify any font parameters (like fontSize, etc.), the underlying TextLayout returns bogus values. So we're checking now if the fontSize != Unspecified (though there may be some other indicators we'd need to use in the future), and if it is we fallback to just masking by global visible bounds.

Before

Google Chrome 2025-04-24 23 27 04

After

Google Chrome 2025-04-24 23 25 44

💡 Motivation and Context

Probably part of #4177

💚 How did you test it?

manually + automated

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Apr 25, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 383.72 ms 397.30 ms 13.57 ms
Size 1.58 MiB 2.08 MiB 507.68 KiB

Previous results on branch: rz/fix/session-replay-compose-text-nostyle-masking

Startup times

Revision Plain With Sentry Diff
fbc04cf 392.59 ms 406.14 ms 13.56 ms

App size

Revision Plain With Sentry Diff
fbc04cf 1.58 MiB 2.08 MiB 507.64 KiB

@@ -45,6 +45,10 @@ case "$ACTION" in
adb shell setprop log.tag.BufferQueueProducer D
adb shell setprop log.tag.ReflectedParamUpdater D
adb shell setprop log.tag.hw-BpHwBinder D
adb shell setprop log.tag.ACodec D
Copy link
Member Author

@romtsn romtsn Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found these when running on a pixel device, so just added them here, not related to this PR

@romtsn romtsn merged commit 17041e9 into main Apr 28, 2025
39 checks passed
@romtsn romtsn deleted the rz/fix/session-replay-compose-text-nostyle-masking branch April 28, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants