Skip to content

Commit

Permalink
Remove startEmptySurface from SurfaceManager (facebook#48479)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#48479

[Changelog] [Internal] - Remove startEmptySurface from SurfaceManager

Most of the logic deleted here does not seem to be needed as the core functionality is in:

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp#L88-L96

And this code path can be reached both via
- `startSurface` (by passing in an empty `moduleModule` OR
- `startEmptySurface`

Reviewed By: shwanton, rubennorte

Differential Revision: D67805569

fbshipit-source-id: e3d06dcaa637996498a6cb52b5c1b98f740326ce
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Jan 6, 2025
1 parent 0154372 commit c4edfe7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ SurfaceHandler::SurfaceHandler(
parameters_.surfaceId = surfaceId;
}

SurfaceHandler::SurfaceHandler(SurfaceId surfaceId) noexcept {
parameters_.surfaceId = surfaceId;
}

SurfaceHandler::SurfaceHandler(SurfaceHandler&& other) noexcept {
operator=(std::move(other));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ class SurfaceHandler {
*/
SurfaceHandler(const std::string& moduleName, SurfaceId surfaceId) noexcept;

/*
* Can be constructed anytime with a `surfaceId`.
* As the module name is not passed, the surface will have to be rendered
* manually by the caller (AppRegistry will not be called).
*/
SurfaceHandler(SurfaceId surfaceId) noexcept;

virtual ~SurfaceHandler() noexcept;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ void SurfaceManager::startSurface(
});
}

void SurfaceManager::startEmptySurface(
SurfaceId surfaceId,
const LayoutConstraints& layoutConstraints,
const LayoutContext& layoutContext) const noexcept {
startSurface(surfaceId, "", {}, layoutConstraints, layoutContext);
}

void SurfaceManager::stopSurface(SurfaceId surfaceId) const noexcept {
visit(surfaceId, [&](const SurfaceHandler& surfaceHandler) {
surfaceHandler.stop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class SurfaceManager final {
const LayoutConstraints& layoutConstraints = {},
const LayoutContext& layoutContext = {}) const noexcept;

void startEmptySurface(
SurfaceId surfaceId,
const LayoutConstraints& layoutConstraints = {},
const LayoutContext& layoutContext = {}) const noexcept;

void stopSurface(SurfaceId surfaceId) const noexcept;

void stopAllSurfaces() const noexcept;
Expand Down

0 comments on commit c4edfe7

Please sign in to comment.