mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: * Create `ImageTelemetry` as a property of ImageRequest to pass image metadata from the ImageShadowNode into RCTImageComponentView * ImageRequest is a object in the ImageShadowNode::ConcreteState Reviewed By: fkgozali Differential Revision: D23239664 fbshipit-source-id: db0f08bb889af8ce63fbe1abe88744edddb86150
31 lines
726 B
C++
31 lines
726 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include <react/renderer/core/ReactPrimitives.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/*
|
|
* Represents telemetry data associated with a image request
|
|
*/
|
|
class ImageTelemetry final {
|
|
public:
|
|
ImageTelemetry(SurfaceId const surfaceId) : surfaceId_(surfaceId) {}
|
|
|
|
SurfaceId getSurfaceId() const;
|
|
std::string getLoaderModuleName() const;
|
|
void setLoaderModuleName(std::string const &loaderModuleName);
|
|
|
|
private:
|
|
const SurfaceId surfaceId_;
|
|
std::string loaderModuleName_{""};
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|