Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[WEEX-586][Android] Revert Weex Render High Performance Cross Platform (
Browse files Browse the repository at this point in the history
#1579)

* [WEEX-586][Android] Revert Weex Render High Performance Cross Platform Render Engine

* [WEEX-586][Android] Revert Weex Render High Performance Cross Platform Render Engine
  • Loading branch information
gubaojian authored and YorkShen committed Sep 26, 2018
1 parent 7700b0b commit 584374e
Show file tree
Hide file tree
Showing 94 changed files with 50 additions and 5,610 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,13 @@
import com.alibaba.weex.extend.module.WXEventModule;
import com.alibaba.weex.extend.module.WXTitleBar;
import com.alibaba.weex.extend.module.WXWsonTestModule;
import com.alibaba.weex.extend.render.PicassoImageAdapter;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.taobao.weex.InitConfig;
import com.taobao.weex.WXEnvironment;
import com.taobao.weex.WXSDKEngine;
import com.taobao.weex.WXSDKManager;
import com.taobao.weex.bridge.WXBridgeManager;
import com.taobao.weex.common.WXException;
import com.taobao.weex.render.RenderSDK;
import com.taobao.weex.render.bridge.RenderBridge;
import com.taobao.weex.render.log.RenderLog;

public class WXApplication extends Application {

Expand Down Expand Up @@ -90,7 +86,7 @@ public void onCreate() {
WXSDKEngine.registerComponent("synccomponent", WXComponentSyncTest.class);
WXSDKEngine.registerComponent(WXParallax.PARALLAX, WXParallax.class);

//WXSDKEngine.registerComponent("richtext", RichText.class);
WXSDKEngine.registerComponent("richtext", RichText.class);
WXSDKEngine.registerModule("render", RenderModule.class);
WXSDKEngine.registerModule("event", WXEventModule.class);
WXSDKEngine.registerModule("syncTest", SyncTestModule.class);
Expand All @@ -103,7 +99,6 @@ public void onCreate() {

WXSDKEngine.registerModule("wsonTest", WXWsonTestModule.class);

RenderSDK.getInstance().setApplication(this).setImageAdapter(new PicassoImageAdapter()).init();

/**
* override default image tag
Expand All @@ -113,8 +108,6 @@ public void onCreate() {
//Typeface nativeFont = Typeface.createFromAsset(getAssets(), "font/native_font.ttf");
//WXEnvironment.setGlobalFontFamily("bolezhusun", nativeFont);

//RenderLog.openRenderLog(true);

} catch (WXException e) {
e.printStackTrace();
}
Expand Down

This file was deleted.

This file was deleted.

Binary file modified android/sdk/libs/armeabi-v7a/libweexcore.so
Binary file not shown.
Binary file modified android/sdk/libs/armeabi/libweexcore.so
Binary file not shown.
Binary file modified android/sdk/libs/x86/libweexcore.so
Binary file not shown.
33 changes: 1 addition & 32 deletions android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import com.taobao.weex.appfram.storage.WXStorageModule;
import com.taobao.weex.appfram.websocket.WebSocketModule;
import com.taobao.weex.bridge.ModuleFactory;
import com.taobao.weex.bridge.WXBridge;
import com.taobao.weex.bridge.WXBridgeManager;
import com.taobao.weex.bridge.WXModuleManager;
import com.taobao.weex.bridge.WXServiceManager;
Expand All @@ -50,9 +49,8 @@
import com.taobao.weex.common.WXException;
import com.taobao.weex.common.WXInstanceWrap;
import com.taobao.weex.common.WXModule;
import com.taobao.weex.common.WXPerformance;
import com.taobao.weex.http.WXStreamModule;
import com.taobao.weex.render.RenderSDK;
import com.taobao.weex.render.event.SDKOnInitListener;
import com.taobao.weex.ui.ExternalLoaderComponentHolder;
import com.taobao.weex.ui.IExternalComponentGetter;
import com.taobao.weex.ui.IExternalModuleGetter;
Expand All @@ -65,7 +63,6 @@
import com.taobao.weex.ui.component.WXBasicComponentType;
import com.taobao.weex.ui.component.WXComponent;
import com.taobao.weex.ui.component.WXDiv;
import com.taobao.weex.ui.component.document.WXDocumentComponent;
import com.taobao.weex.ui.component.WXEmbed;
import com.taobao.weex.ui.component.WXHeader;
import com.taobao.weex.ui.component.WXImage;
Expand Down Expand Up @@ -180,32 +177,10 @@ public static void initialize(Application application,InitConfig config){
registerApplicationOptions(application);
WXEnvironment.sSDKInitInvokeTime = System.currentTimeMillis()-start;
WXLogUtils.renderPerformanceLog("SDKInitInvokeTime", WXEnvironment.sSDKInitInvokeTime);
doRenderSwitchConfig();
mIsInit = true;
}
}

private static void doRenderSwitchConfig(){
if(RenderSDK.getInstance().getSdkOnInitListener() != null){
return;
}
RenderSDK.getInstance().setSdkOnInitListener(new SDKOnInitListener() {
@Override
public void onInit(final boolean result) {
if(result){
WXBridgeManager.getInstance().post(new Runnable() {
@Override
public void run() {
if(WXBridgeManager.getInstance().getBridge() instanceof WXBridge){
((WXBridge) WXBridgeManager.getInstance().getBridge()).setSegmentSwitch(result);
}
}
});
}
}
});
}

private static void registerApplicationOptions(final Application application) {

if (application == null) {
Expand Down Expand Up @@ -303,12 +278,6 @@ private static void register() {
WXBasicComponentType.HEADER,
WXBasicComponentType.FOOTER
);
registerComponent(
new SimpleComponentHolder(
WXDocumentComponent.class,
new WXDocumentComponent.Ceator()
),
false, WXDocumentComponent.DOCUMENT_COMPONENT);
registerComponent(
new SimpleComponentHolder(
WXImage.class,
Expand Down
10 changes: 0 additions & 10 deletions android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan

private List<String> mLayerOverFlowListeners;

private boolean hasDocumentSegment;

public List<String> getLayerOverFlowListeners() {
return mLayerOverFlowListeners;
}
Expand Down Expand Up @@ -2171,12 +2169,4 @@ public void addInstanceOnFireEventInterceptor(InstanceOnFireEventInterceptor ins
getInstanceOnFireEventInterceptorList().add(instanceOnFireEventInterceptor);
}
}

public boolean isHasDocumentSegment() {
return hasDocumentSegment;
}

public void setHasDocumentSegment(boolean hasDocumentSegment) {
this.hasDocumentSegment = hasDocumentSegment;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,5 @@ public interface IWXUserTrackAdapter {
String MONITOR_ARG = "arg";
String MONITOR_ERROR_MSG = "errMsg";

String WEEX_RENDER = "weexrender";

void commit(Context context, String eventId, String type, WXPerformance perf, Map<String, Serializable> params);
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public class WXBridge implements IWXBridge {
private native void nativeRegisterCoreEnv(String key, String value);

private native void nativeResetWXBridge(Object bridge, String className);
private native void nativeSetSegmentSwitch(boolean segmentSwitch);

/**
* update global config,
Expand Down Expand Up @@ -657,11 +656,6 @@ public void registerCoreEnv(String key, String value) {
nativeRegisterCoreEnv(key, value);
}


public void setSegmentSwitch(boolean segmentSwitch) {
nativeSetSegmentSwitch(segmentSwitch);
}

@CalledByNative
public void reportNativeInitStatus(String statusCode, String errorMsg) {
if (WXErrorCode.WX_JS_FRAMEWORK_INIT_SINGLE_PROCESS_SUCCESS.getErrorCode().equals(statusCode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,21 +479,6 @@ public void postDelay(Runnable r,long delayMillis){
mJSHandler.postDelayed(WXThread.secure(r),delayMillis);
}


public void postAtFrontOfQueue(Runnable r){
if (mJSHandler == null) {
return;
}
mJSHandler.postAtFrontOfQueue(r);
}

public void removeCallback(Runnable r){
if (mJSHandler == null) {
return;
}
mJSHandler.removeCallbacks(r);
}

void setTimeout(String callbackId, String time) {
Message message = Message.obtain();
message.what = WXJSBridgeMsgType.SET_TIMEOUT;
Expand Down Expand Up @@ -2448,8 +2433,7 @@ public int callAddElement(String pageId, String componentType, String ref, int i
.append(", parentRef:").append(parentRef)
.append(", styles:").append(styles)
.append(", attributes:").append(attributes)
.append(", events:").append(events)
.append(", willLayout").append(willLayout);
.append(", events:").append(events);
WXLogUtils.d(mLodBuilder.substring(0));
mLodBuilder.setLength(0);
}
Expand Down Expand Up @@ -3025,10 +3009,4 @@ private void onJsFrameWorkInitSuccees() {
}
mWeexCoreEnvOptions.clear();
}


public IWXBridge getBridge(){
return mWXBridge;
}

}
Loading

0 comments on commit 584374e

Please sign in to comment.