Files
react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h
T
Paige SunandFacebook GitHub Bot d4e1202b4e 2/6 Track image request metadata in ImageTelemetry, to be passed from ImageShadowNode into RCTImageComponentView
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
2020-09-11 15:09:11 -07:00

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