Skip to content

Commit

Permalink
refactor: TileManager
Browse files Browse the repository at this point in the history
  • Loading branch information
ktgw0316 committed Feb 18, 2024
1 parent 823b5bd commit 87bb4d2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void cancelPrefetch() {
final var canceled = requests.stream()
.filter(pr -> pr == prefetchRequest)
.map(this::cancelRequest)
.collect(Collectors.toList());
.toList();
requests.removeAll(canceled);

prefetchRequest = null;
Expand All @@ -141,7 +141,7 @@ public synchronized void cancelTiles(PlanarImage image, int epoch) {
.filter(pr -> pr.image == image)
.filter(pr -> pr.epoch == epoch)
.map(this::cancelRequest)
.collect(Collectors.toList());
.toList();
requests.removeAll(canceled);
}

Expand All @@ -168,7 +168,7 @@ request already enqueued. This is necessary since AWT can (and often
.filter(not(PaintRequest::isCancelled))
.filter(pr -> pr.image == image)
.filter(pr -> pr.epoch == epoch)
.collect(Collectors.toList());
.toList();
tiles.removeIf(t -> paintRequests.stream().anyMatch(pr -> pr.hasTile(t)));

if (!tiles.isEmpty()) {
Expand Down

0 comments on commit 87bb4d2

Please sign in to comment.