Files
react-native/ReactAndroid/src/main/java/com/facebook/react/flat/RCTImageViewManager.java
Denis Koroskin 7075744b94 Implement DrawImage using Drawee
Summary: Alternative implementation of DrawImage using DraweeHierarchy instead of ImagePipeline directly. Yields same results, but potentially more stable. We'll run tests to measure performance of both.

Reviewed By: ahmedre

Differential Revision: D2746197
2016-12-19 13:40:19 -08:00

35 lines
901 B
Java

/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.react.flat;
/* package */ final class RCTImageViewManager extends FlatViewManager {
private static final boolean USE_IMAGEPIPELINE_DIRECTLY = false;
@Override
public String getName() {
return "RCTImageView";
}
@Override
public RCTImageView createShadowNodeInstance() {
if (USE_IMAGEPIPELINE_DIRECTLY) {
return new RCTImageView(new DrawImageWithPipeline());
} else {
return new RCTImageView(new DrawImageWithDrawee());
}
}
@Override
public Class<RCTImageView> getShadowNodeClass() {
return RCTImageView.class;
}
}