Switching to the new FabricUIManager and all new shadow tree infra
Reviewed By: fkgozali Differential Revision: D7230670 fbshipit-source-id: bca7d2859b87931c0d15406782b7d689de1d8c36
This commit is contained in:
parent
c2ad59a277
commit
4cda0df2e5
|
@ -10,7 +10,7 @@
|
|||
|
||||
#import <memory>
|
||||
|
||||
#include <fabric/IFabricPlatformUIOperationManager.h>
|
||||
#include <fabric/uimanager/IFabricPlatformUIOperationManager.h>
|
||||
|
||||
@class RCTFabricPlatformUIOperationManager;
|
||||
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
|
||||
#import "RCTFabricUIManagerWrapper.h"
|
||||
|
||||
#include <fabric/FabricUIManager.h>
|
||||
#include <fabric/uimanager/FabricUIManager.h>
|
||||
|
||||
#include <folly/dynamic.h>
|
||||
#include <folly/json.h>
|
||||
|
||||
|
||||
#import "RCTFabricPlatformUIOperationManager.h"
|
||||
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
load("//configurations/buck/apple:flag_defs.bzl", "get_debug_preprocessor_flags")
|
||||
load("//ReactNative:DEFS.bzl", "IS_OSS_BUILD", "react_native_xplat_target", "rn_xplat_cxx_library", "APPLE_INSPECTOR_FLAGS")
|
||||
|
||||
APPLE_COMPILER_FLAGS = []
|
||||
|
||||
if not IS_OSS_BUILD:
|
||||
load("@xplat//configurations/buck/apple:flag_defs.bzl", "get_static_library_ios_flags", "flags")
|
||||
APPLE_COMPILER_FLAGS = flags.get_flag_value(get_static_library_ios_flags(), 'compiler_flags')
|
||||
|
||||
rn_xplat_cxx_library(
|
||||
name = "fabric",
|
||||
srcs = glob(["*.cpp"]),
|
||||
header_namespace = "",
|
||||
exported_headers = subdir_glob(
|
||||
[
|
||||
("", "*.h"),
|
||||
],
|
||||
prefix = "fabric",
|
||||
),
|
||||
compiler_flags = [
|
||||
"-fexceptions",
|
||||
"-frtti",
|
||||
"-std=c++14",
|
||||
"-Wall",
|
||||
],
|
||||
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
|
||||
fbobjc_preprocessor_flags = get_debug_preprocessor_flags() + APPLE_INSPECTOR_FLAGS,
|
||||
force_static = True,
|
||||
preprocessor_flags = [
|
||||
"-DLOG_TAG=\"ReactNative\"",
|
||||
"-DWITH_FBSYSTRACE=1",
|
||||
],
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
"xplat//fbsystrace:fbsystrace",
|
||||
"xplat//folly:headers_only",
|
||||
"xplat//folly:memory",
|
||||
"xplat//folly:molly",
|
||||
"xplat//third-party/glog:glog",
|
||||
react_native_xplat_target("fabric/core:core"),
|
||||
react_native_xplat_target("fabric/uimanager:uimanager"),
|
||||
react_native_xplat_target("fabric/view:view"),
|
||||
],
|
||||
)
|
|
@ -46,7 +46,8 @@ rn_xplat_cxx_library(
|
|||
"xplat//folly:memory",
|
||||
"xplat//folly:molly",
|
||||
"xplat//third-party/glog:glog",
|
||||
react_native_xplat_target("fabric/debug:debug"),
|
||||
react_native_xplat_target("fabric/core:core"),
|
||||
react_native_xplat_target("fabric/debug:debug"),
|
||||
react_native_xplat_target("fabric/view:view"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "FabricUIManager.h"
|
||||
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <fabric/core/LayoutContext.h>
|
||||
#include <fabric/view/ViewComponentDescriptor.h>
|
||||
#include <fabric/view/ViewProps.h>
|
||||
|
@ -97,12 +99,14 @@ void FabricUIManager::completeRoot(int rootTag, const SharedShadowNodeUnsharedLi
|
|||
LayoutContext layoutContext = LayoutContext();
|
||||
layoutContext.affectedShadowNodes = std::make_shared<std::unordered_set<SharedLayoutableShadowNode>>();
|
||||
|
||||
LOG(INFO) << "Shadow tree *before* layout: \n" << viewShadowNode->getDebugDescription() ;
|
||||
|
||||
auto nonConstViewShadowNode = std::const_pointer_cast<ViewShadowNode>(viewShadowNode);
|
||||
nonConstViewShadowNode->layout(layoutContext);
|
||||
|
||||
rootShadowNode->sealRecursive();
|
||||
|
||||
printf("## layouted rootShadowNode: %s \n", nonConstViewShadowNode->getDebugDescription(0).c_str());
|
||||
LOG(INFO) << "Shadow tree *after* layout: \n" << nonConstViewShadowNode->getDebugDescription();
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
|
|
Loading…
Reference in New Issue