Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionGroup.cpp')
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 1a0bd95b7d6..e437b069e33 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -27,6 +27,8 @@
#include "BLI_math.h"
#include "PIL_time.h"
+#include "WM_api.h"
+#include "WM_types.h"
#include "COM_ExecutionGroup.h"
#include "COM_InputSocket.h"
@@ -347,6 +349,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
finished = false;
startEvaluated = true;
numberEvaluated++;
+
+ WM_main_add_notifier(NC_WINDOW | ND_DRAW, NULL);
}
else if (state == COM_ES_SCHEDULED) {
finished = false;
@@ -485,14 +489,18 @@ bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area
float chunkSizef = this->m_chunkSize;
int indexx, indexy;
- const int minxchunk = floor(area->xmin / chunkSizef);
- const int maxxchunk = ceil((area->xmax - 1) / chunkSizef);
- const int minychunk = floor(area->ymin / chunkSizef);
- const int maxychunk = ceil((area->ymax - 1) / chunkSizef);
+ int minxchunk = floor(area->xmin / chunkSizef);
+ int maxxchunk = ceil((area->xmax - 1) / chunkSizef);
+ int minychunk = floor(area->ymin / chunkSizef);
+ int maxychunk = ceil((area->ymax - 1) / chunkSizef);
+ minxchunk = MAX2(minxchunk, 0);
+ minychunk = MAX2(minychunk, 0);
+ maxxchunk = MIN2(maxxchunk, this->m_numberOfXChunks);
+ maxychunk = MIN2(maxychunk, this->m_numberOfYChunks);
bool result = true;
- for (indexx = max(minxchunk, 0); indexx < maxxchunk; indexx++) {
- for (indexy = max(minychunk, 0); indexy < maxychunk; indexy++) {
+ for (indexx = minxchunk; indexx < maxxchunk; indexx++) {
+ for (indexy = minychunk; indexy < maxychunk; indexy++) {
if (!scheduleChunkWhenPossible(graph, indexx, indexy)) {
result = false;
}