Files
react-native/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm
T
Valentin SherginandFacebook Github Bot 8f51243957 Fabric: Enabling clang-format for the rest of Fabric
Summary: This is the second and the final part of adopting clang-format.

Reviewed By: mdvacca

Differential Revision: D10229624

fbshipit-source-id: d97670b716800ea2488b84bd0aacaf54d8bd2e31
2018-10-09 16:31:48 -07:00

35 lines
883 B
Plaintext

/**
* 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 "ImageManager.h"
#import <React/RCTImageLoader.h>
#import "RCTImageManager.h"
namespace facebook {
namespace react {
ImageManager::ImageManager(void *platformSpecificCounterpart) {
self_ = (__bridge_retained void *)[[RCTImageManager alloc]
initWithImageLoader:(__bridge RCTImageLoader *)
platformSpecificCounterpart];
}
ImageManager::~ImageManager() {
CFRelease(self_);
self_ = nullptr;
}
ImageRequest ImageManager::requestImage(const ImageSource &imageSource) const {
RCTImageManager *imageManager = (__bridge RCTImageManager *)self_;
return [imageManager requestImage:imageSource];
}
} // namespace react
} // namespace facebook