Skip to content

Commit ac1cdaa

Browse files
rshestfacebook-github-bot
authored andcommitted
Make ImageManager implementation overridable (facebook#41582)
Summary: Pull Request resolved: facebook#41582 # Changelog: This will allow to have custom `ImageManager` implementations on new platforms. Reviewed By: christophpurrer Differential Revision: D51495143 fbshipit-source-id: bbd03bdad1b87fd53e70a886f1fdc74f371987c8
1 parent 1e43d2b commit ac1cdaa

File tree

1 file changed

+6
-4
lines changed
  • packages/react-native/ReactCommon/react/renderer/imagemanager

1 file changed

+6
-4
lines changed

packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ class ImageManager;
2121
using SharedImageManager = std::shared_ptr<ImageManager>;
2222

2323
/*
24-
* Cross platform facade for iOS-specific RCTImageManager.
24+
* Cross platform facade for image management (e.g. iOS-specific
25+
* RCTImageManager)
2526
*/
2627
class ImageManager {
2728
public:
2829
ImageManager(const ContextContainer::Shared& contextContainer);
29-
~ImageManager();
30+
virtual ~ImageManager();
3031

31-
ImageRequest requestImage(const ImageSource& imageSource, SurfaceId surfaceId)
32-
const;
32+
virtual ImageRequest requestImage(
33+
const ImageSource& imageSource,
34+
SurfaceId surfaceId) const;
3335

3436
private:
3537
void* self_{};

0 commit comments

Comments
 (0)