mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
remove force_static from textinput module
Summary: changelog: [internal] force_static doesn't need to be in here, let's remove it. I change one module per diff. It makes it easier to land it and pinpoint where build failures are coming from. Reviewed By: christophpurrer Differential Revision: D56678530 fbshipit-source-id: c602e065d77fdd649c66ce2d26eee83428ef5ba8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bb2c13af53
commit
bb120ff663
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ImageComponentDescriptor.h"
|
||||
#include <react/renderer/imagemanager/ImageManager.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
ImageComponentDescriptor::ImageComponentDescriptor(
|
||||
const ComponentDescriptorParameters& parameters)
|
||||
: ConcreteComponentDescriptor(parameters),
|
||||
imageManager_(std::make_shared<ImageManager>(contextContainer_)){};
|
||||
|
||||
void ImageComponentDescriptor::adopt(ShadowNode& shadowNode) const {
|
||||
ConcreteComponentDescriptor::adopt(shadowNode);
|
||||
|
||||
auto& imageShadowNode = static_cast<ImageShadowNode&>(shadowNode);
|
||||
|
||||
// `ImageShadowNode` uses `ImageManager` to initiate image loading and
|
||||
// communicate the loading state and results to mounting layer.
|
||||
imageShadowNode.setImageManager(imageManager_);
|
||||
}
|
||||
} // namespace facebook::react
|
||||
+6
-15
@@ -9,33 +9,24 @@
|
||||
|
||||
#include <react/renderer/components/image/ImageShadowNode.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
#include <react/renderer/imagemanager/ImageManager.h>
|
||||
#include <react/utils/ContextContainer.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class ImageManager;
|
||||
|
||||
/*
|
||||
* Descriptor for <Image> component.
|
||||
*/
|
||||
class ImageComponentDescriptor final
|
||||
: public ConcreteComponentDescriptor<ImageShadowNode> {
|
||||
public:
|
||||
ImageComponentDescriptor(const ComponentDescriptorParameters& parameters)
|
||||
: ConcreteComponentDescriptor(parameters),
|
||||
imageManager_(std::make_shared<ImageManager>(contextContainer_)){};
|
||||
explicit ImageComponentDescriptor(
|
||||
const ComponentDescriptorParameters& parameters);
|
||||
|
||||
void adopt(ShadowNode& shadowNode) const override {
|
||||
ConcreteComponentDescriptor::adopt(shadowNode);
|
||||
|
||||
auto& imageShadowNode = static_cast<ImageShadowNode&>(shadowNode);
|
||||
|
||||
// `ImageShadowNode` uses `ImageManager` to initiate image loading and
|
||||
// communicate the loading state and results to mounting layer.
|
||||
imageShadowNode.setImageManager(imageManager_);
|
||||
}
|
||||
void adopt(ShadowNode& shadowNode) const override;
|
||||
|
||||
private:
|
||||
const SharedImageManager imageManager_;
|
||||
const std::shared_ptr<ImageManager> imageManager_;
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
Reference in New Issue
Block a user