mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 14:15:28 +02:00
address code review comments
This commit is contained in:
parent
e1d79ee8f4
commit
a8ac015bc4
2 changed files with 4 additions and 2 deletions
|
@ -280,10 +280,10 @@ void AssetServer::aboutToFinish() {
|
||||||
// abort each of our still running bake tasks, remove pending bakes that were never put on the thread pool
|
// abort each of our still running bake tasks, remove pending bakes that were never put on the thread pool
|
||||||
auto it = _pendingBakes.begin();
|
auto it = _pendingBakes.begin();
|
||||||
while (it != _pendingBakes.end()) {
|
while (it != _pendingBakes.end()) {
|
||||||
auto pendingRunnable = _bakingTaskPool.tryTake(it.value().get());
|
auto pendingRunnable = _bakingTaskPool.tryTake(it->get());
|
||||||
|
|
||||||
if (pendingRunnable) {
|
if (pendingRunnable) {
|
||||||
_pendingBakes.erase(it);
|
it = _pendingBakes.erase(it);
|
||||||
} else {
|
} else {
|
||||||
it.value()->abort();
|
it.value()->abort();
|
||||||
++it;
|
++it;
|
||||||
|
|
|
@ -460,6 +460,8 @@ void generateMips(gpu::Texture* texture, QImage& image, const std::atomic<bool>&
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
if (!_abortProcessing.load()) {
|
if (!_abortProcessing.load()) {
|
||||||
task(context, i);
|
task(context, i);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue