Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ val preparePrefab by
"../ReactCommon/react/renderer/imagemanager/",
"react/renderer/imagemanager/",
),
Pair("../ReactCommon/react/renderer/imagemanager/platform/cxx/", ""),
Pair("../ReactCommon/react/renderer/imagemanager/React/", "React/"),
Pair("../ReactCommon/react/renderer/imagemanager/platform/android/", ""),
// react_renderer_mounting
Pair("../ReactCommon/react/renderer/mounting/", "react/renderer/mounting/"),
// react_renderer_scheduler
Expand All @@ -173,6 +174,7 @@ val preparePrefab by
"../ReactCommon/react/renderer/components/image/",
"react/renderer/components/image/",
),
Pair("../ReactCommon/react/renderer/components/image/React/", "React/"),
// rrc_view
Pair(
"../ReactCommon/react/renderer/components/view/",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ Pod::Spec.new do |s|
ss.header_dir = "react/renderer/imagemanager"
end

s.subspec "imagemanagerUmbrella" do |ss|
ss.source_files = "react/renderer/imagemanager/React/*.h"
ss.header_dir = ""
ss.header_mappings_dir = "react/renderer/imagemanager"
end

s.subspec "mounting" do |ss|
ss.dependency "React-jsinspectortracing"
ss.source_files = podspec_sources("react/renderer/mounting/**/*.{m,mm,cpp,h}", "react/renderer/mounting/**/*.h")
Expand Down
8 changes: 7 additions & 1 deletion packages/react-native/ReactCommon/React-FabricImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("react/renderer/components/image/**/*.{m,mm,cpp,h}", "react/renderer/components/image/**/*.h")
s.exclude_files = "react/renderer/components/image/tests"
s.exclude_files = ["react/renderer/components/image/tests", "react/renderer/components/image/React"]
s.header_dir = "react/renderer/components/image"
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"HEADER_SEARCH_PATHS" => header_search_path.join(" ")
}

s.subspec "imageUmbrella" do |ss|
ss.source_files = "react/renderer/components/image/React/*.h"
ss.header_dir = ""
ss.header_mappings_dir = "react/renderer/components/image"
end

resolve_use_frameworks(s, header_mappings_dir: './', module_name: "React_FabricImage")

s.dependency "React-jsiexecutor", version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ file(GLOB rrc_image_SRC CONFIGURE_DEPENDS *.cpp)
add_library(rrc_image OBJECT ${rrc_image_SRC})

target_include_directories(rrc_image PUBLIC ${REACT_COMMON_DIR})
target_include_directories(rrc_image INTERFACE ${REACT_COMMON_DIR}/react/renderer/components/image)

target_link_libraries(rrc_image
glog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/components/image/ImageShadowNode.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/components/view/ViewEventEmitter.h>
#include <react/renderer/imagemanager/primitives.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/components/image/ImageEventEmitter.h>
#include <react/renderer/components/image/ImageProps.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/imagemanager/ImageRequest.h>
#include <react/renderer/imagemanager/ImageRequestParams.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `react/renderer/components/image` module - public
// entry point.
//
// #include <React/Image.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/renderer/components/image/...>`
// includes; only outside consumers use this umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <react/renderer/components/image/ImageComponentDescriptor.h>
#include <react/renderer/components/image/ImageEventEmitter.h>
#include <react/renderer/components/image/ImageProps.h>
#include <react/renderer/components/image/ImageShadowNode.h>
#include <react/renderer/components/image/ImageState.h>
#include <react/renderer/components/image/conversions.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_include_directories(react_renderer_imagemanager
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(react_renderer_imagemanager INTERFACE ${REACT_COMMON_DIR}/react/renderer/imagemanager)

react_native_android_selector(mapbufferjni mapbufferjni "")
react_native_android_selector(reactnativejni reactnativejni "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/imagemanager/ImageResponse.h>
#include <react/renderer/imagemanager/ImageResponseObserver.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/imagemanager/ImageResponse.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/imagemanager/ImageResponse.h>
#include <react/renderer/imagemanager/ImageResponseObserver.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/core/ReactPrimitives.h>
#include <react/utils/Telemetry.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `react/renderer/imagemanager` module - public entry
// point.
//
// #include <React/ImageManager.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/renderer/imagemanager/...>`
// includes; only outside consumers use this umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <react/renderer/imagemanager/ImageManager.h>
#include <react/renderer/imagemanager/ImageRequest.h>
#include <react/renderer/imagemanager/ImageRequestParams.h>
#include <react/renderer/imagemanager/ImageResponse.h>
#include <react/renderer/imagemanager/ImageResponseObserver.h>
#include <react/renderer/imagemanager/ImageResponseObserverCoordinator.h>
#include <react/renderer/imagemanager/ImageTelemetry.h>
#include <react/renderer/imagemanager/primitives.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/PrivateGuard.h>

#include <react/renderer/imagemanager/ImageRequest.h>
#include <react/renderer/imagemanager/ImageRequestParams.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <utility>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/PrivateGuard.h>

#include <react/featureflags/ReactNativeFeatureFlags.h>
#include <react/renderer/core/graphicsConversions.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Float.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Float.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

#include <react/cxxstableapi/FrameworksGuard.h>

#import <UIKit/UIKit.h>

#import "RCTImageManagerProtocol.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

#include <react/cxxstableapi/FrameworksGuard.h>

#import <Foundation/Foundation.h>
#import <react/renderer/core/ReactPrimitives.h>
#import <react/renderer/imagemanager/ImageRequest.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

#include <react/cxxstableapi/FrameworksGuard.h>

#import <UIKit/UIKit.h>

#import <React/RCTConvert.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

#include <react/cxxstableapi/FrameworksGuard.h>

#import <UIKit/UIKit.h>

#import "RCTImageManagerProtocol.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/cxxstableapi/UmbrellaGuard.h>

#include <string>
#include <vector>
Expand Down
22 changes: 22 additions & 0 deletions packages/react-native/scripts/ios-prebuild/headers-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ const PodspecExceptions /*: {[key: string]: PodSpecConfiguration} */ = {
headerDir: 'react/renderer/imagemanager',
},

{
name: 'imagemanagerUmbrella',
headerPatterns: ['react/renderer/imagemanager/React/*.h'],
headerDir: 'React',
},

{
name: 'mounting',
headerPatterns: ['react/renderer/mounting/**/*.h'],
Expand Down Expand Up @@ -455,6 +461,22 @@ const PodspecExceptions /*: {[key: string]: PodSpecConfiguration} */ = {
},
],
},
'ReactCommon/React-FabricImage.podspec': {
name: 'React-FabricImage',
headerPatterns: ['react/renderer/components/image/**/*.h'],
excludePatterns: [
'react/renderer/components/image/tests',
'react/renderer/components/image/React',
],
headerDir: 'react/renderer/components/image',
subSpecs: [
{
name: 'imageUmbrella',
headerPatterns: ['react/renderer/components/image/React/*.h'],
headerDir: 'React',
},
],
},
'ReactCommon/React-Mapbuffer.podspec': {
name: 'React-Mapbuffer',
headerPatterns: ['react/renderer/mapbuffer/**/*.h'],
Expand Down
Loading