Skip to content
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

Turn CXX implementation of TextLayoutManager into interface #39805

Closed
wants to merge 1 commit into from

Conversation

rshest
Copy link
Contributor

@rshest rshest commented Oct 4, 2023

Summary:

Changelog:

[Internal] -

This makes corresponsing text measure methods inside TextLayoutManager overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making TextLayoutManager an interface across all the platforms, and actual implementations called e.g. TextLayoutManagerImpl in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Differential Revision: D49907594

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Oct 4, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

rshest added a commit to rshest/react-native that referenced this pull request Oct 4, 2023
…#39805)

Summary:
Pull Request resolved: facebook#39805

## Changelog:
[Internal] -

This makes corresponsing text measure methods inside `TextLayoutManager` overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making `TextLayoutManager` an interface across all the platforms, and actual implementations called e.g. `TextLayoutManagerImpl` in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Differential Revision: D49907594

fbshipit-source-id: c42cf4cd93607ccfd7aed44f15cce300814de233
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

rshest added a commit to rshest/react-native that referenced this pull request Oct 4, 2023
…#39805)

Summary:
Pull Request resolved: facebook#39805

## Changelog:
[Internal] -

This makes corresponsing text measure methods inside `TextLayoutManager` overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making `TextLayoutManager` an interface across all the platforms, and actual implementations called e.g. `TextLayoutManagerImpl` in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Differential Revision: D49907594

fbshipit-source-id: 565020f83a3f9e6af2f8b04580b519f9ecca26e5
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

rshest added a commit to rshest/react-native that referenced this pull request Oct 4, 2023
…#39805)

Summary:
Pull Request resolved: facebook#39805

## Changelog:
[Internal] -

This makes corresponsing text measure methods inside `TextLayoutManager` overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making `TextLayoutManager` an interface across all the platforms, and actual implementations called e.g. `TextLayoutManagerImpl` in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Differential Revision: D49907594

fbshipit-source-id: b0e5e37a5dcd2312abc3d499fa10a02f88713307
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

rshest added a commit to rshest/react-native that referenced this pull request Oct 4, 2023
…#39805)

Summary:
Pull Request resolved: facebook#39805

## Changelog:
[Internal] -

This makes corresponsing text measure methods inside `TextLayoutManager` overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making `TextLayoutManager` an interface across all the platforms, and actual implementations called e.g. `TextLayoutManagerImpl` in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Differential Revision: D49907594

fbshipit-source-id: 8ec10f22b3ea78cc2e92069c43c159c07b91fc93
@analysis-bot
Copy link

analysis-bot commented Oct 4, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 16,894,333 +4
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,373,047 -8
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 2000acc
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

rshest added a commit to rshest/react-native that referenced this pull request Oct 4, 2023
…#39805)

Summary:
Pull Request resolved: facebook#39805

## Changelog:
[Internal] -

This makes corresponsing text measure methods inside `TextLayoutManager` overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making `TextLayoutManager` an interface across all the platforms, and actual implementations called e.g. `TextLayoutManagerImpl` in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Differential Revision: D49907594

fbshipit-source-id: 71b177107db706ad3245c043ddc13828ac0716fd
…#39805)

Summary:

## Changelog:
[Internal] -

This makes corresponsing text measure methods inside `TextLayoutManager` overridable, so that it can be substituted with a custom implementation without introducing a new "platform".

Rationale: CXX platform is rather general and less specific than Android or iOS, so we may potentially have multiple alternative implementations of text layout there.

An alternative could be making `TextLayoutManager` an interface across all the platforms, and actual implementations called e.g. `TextLayoutManagerImpl` in each of them, however this would be quite a bit bigger blast radius without much added benefit for Android/iOS.

Reviewed By: christophpurrer

Differential Revision: D49907594
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49907594

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 4, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c969d8c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants