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

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
katherine95s committed Jul 1, 2019
1 parent 13b7410 commit 85bc83d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
Expand Down Expand Up @@ -152,7 +153,7 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan
private Map<String,String> mContainerInfo;

public boolean isNewFsEnd = false;
private List<JSONObject> componentsInfoExceedGPULimit = new ArrayList<>();
private List<JSONObject> componentsInfoExceedGPULimit = new LinkedList<>();

/**
* bundle type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3001,9 +3001,9 @@ private void reportIfReachGPULimit(String instanceId,String ref,GraphicSize layo
if (component.getBorder() != null) {
ext.put("component.border", component.getBorder().toString());
}
Map<String,Object> map = new JSONObject();
JSONObject map = new JSONObject();
map.putAll(ext);
WXSDKManager.getInstance().getSDKInstance(instanceId).setComponentsInfoExceedGPULimit((JSONObject)map);
WXSDKManager.getInstance().getSDKInstance(instanceId).setComponentsInfoExceedGPULimit(map);
if(shouldReportGPULimit()) {
WXExceptionUtils.commitCriticalExceptionRT(instanceId
, WXErrorCode.WX_RENDER_WAR_GPU_LIMIT_LAYOUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1707,9 +1707,9 @@ public void setOpacity(float opacity) {
if (isLayerTypeEnabled()) {
mHost.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
if(shouldCancelHardwareAccelerate() && limit > 0 && (getLayoutHeight() > limit ||
if(isLayerTypeEnabled() && shouldCancelHardwareAccelerate() && limit > 0 && (getLayoutHeight() > limit ||
getLayoutWidth() > limit)){
mHost.setLayerType(View.LAYER_TYPE_SOFTWARE,null);
mHost.setLayerType(View.LAYER_TYPE_NONE,null);
}
mHost.setAlpha(opacity);
}
Expand Down

0 comments on commit 85bc83d

Please sign in to comment.