Skip to content

Commit

Permalink
CacheManagingDrawTask: avoid destroy cache if hasDrawingCache in REBU…
Browse files Browse the repository at this point in the history
…ILD_CACHE action
  • Loading branch information
ctiao committed Nov 24, 2015
1 parent 0e2db49 commit 5c94763
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,10 @@ public void handleMessage(Message msg) {
cacheitem.requestFlags |= BaseDanmaku.FLAG_REQUEST_REMEASURE;
}
cacheitem.requestFlags |= BaseDanmaku.FLAG_REQUEST_INVALIDATE;
if (!pair.second && cacheitem.hasDrawingCache()) {
DanmakuUtils.buildDanmakuDrawingCache(cacheitem, mDisp, (DrawingCache) cacheitem.cache);
if (!pair.second && cacheitem.hasDrawingCache() && !cacheitem.cache.hasReferences()) {
DrawingCache cache = DanmakuUtils.buildDanmakuDrawingCache(cacheitem, mDisp, (DrawingCache) cacheitem.cache);
cacheitem.cache = cache;
push(cacheitem, 0, true);
return;
}
if (cacheitem.isLive) {
Expand Down

0 comments on commit 5c94763

Please sign in to comment.