mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Move DisplayMode out of SurfaceHandler
Summary: This diff moves DisplayMode out of SurfaceHandler, this is necessary in order to use it from react/uimanager package changelog: [internal] internal Reviewed By: ShikaSD Differential Revision: D27669846 fbshipit-source-id: 274869d8f2907b1b159f51240440acece09a746f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
84c70b2a7f
commit
2793bba278
@@ -17,14 +17,13 @@ SurfaceHandlerBinding::SurfaceHandlerBinding(
|
||||
: surfaceHandler_(moduleName, surfaceId) {}
|
||||
|
||||
void SurfaceHandlerBinding::setDisplayMode(jint mode) {
|
||||
surfaceHandler_.setDisplayMode(
|
||||
static_cast<SurfaceHandler::DisplayMode>(mode));
|
||||
surfaceHandler_.setDisplayMode(static_cast<DisplayMode>(mode));
|
||||
}
|
||||
|
||||
void SurfaceHandlerBinding::start() {
|
||||
std::unique_lock<better::shared_mutex> lock(lifecycleMutex_);
|
||||
|
||||
surfaceHandler_.setDisplayMode(SurfaceHandler::DisplayMode::Visible);
|
||||
surfaceHandler_.setDisplayMode(DisplayMode::Visible);
|
||||
if (surfaceHandler_.getStatus() != SurfaceHandler::Status::Running) {
|
||||
surfaceHandler_.start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user