Skip to content

Commit

Permalink
改进大量弹幕情况下有小几率弹幕重叠问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiao committed Jun 15, 2015
1 parent 94a5bca commit 7172af3
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,7 @@ public int compare(BaseDanmaku obj1, BaseDanmaku obj2) {
if (mDuplicateMergingEnable && DanmakuUtils.isDuplicate(obj1, obj2)) {
return 0;
}
int result = Float.compare(obj1.getTop(), obj2.getTop());
if (result != 0) {
return result;
}
return DanmakuUtils.compare(obj1, obj2);
return Float.compare(obj1.getTop(), obj2.getTop());
}
}

Expand All @@ -368,11 +364,7 @@ public int compare(BaseDanmaku obj1, BaseDanmaku obj2) {
if (mDuplicateMergingEnable && DanmakuUtils.isDuplicate(obj1, obj2)) {
return 0;
}
int result = Float.compare(obj2.getTop(), obj1.getTop());
if (result != 0) {
return result;
}
return DanmakuUtils.compare(obj1, obj2);
return Float.compare(obj2.getTop(), obj1.getTop());
}
}

Expand Down

0 comments on commit 7172af3

Please sign in to comment.