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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-22 17:11:38 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-22 17:11:38 +0400
commitf73e023e54923890bdfd2e5f81a3d13866413f75 (patch)
tree98252d403fa54db74d13bf0e19eb6bcd83071245 /source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
parent35bc9b612d12f4b673cd76bf70dfacba28b5671b (diff)
* fix for [#31553] Tile Compositor: Strange seams
Diffstat (limited to 'source/blender/compositor/operations/COM_CombineChannelsOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
index dff8ccf7e73..fb4e6f03e76 100644
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
+++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
@@ -21,7 +21,7 @@
*/
#include "COM_CombineChannelsOperation.h"
-#include <stdio.h>
+#include "BLI_utildefines.h"
CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
{
@@ -36,6 +36,31 @@ CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
this->inputChannel3Operation = NULL;
this->inputChannel4Operation = NULL;
}
+
+bool CombineChannelsOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
+{
+ rcti tempOutput;
+ bool first = true;
+ for (int i = 0 ; i < 4 ; i ++) {
+ NodeOperation * inputOperation = this->getInputOperation(i);
+ if (inputOperation->determineDependingAreaOfInterest(input, readOperation, &tempOutput)) {
+ if (first) {
+ output->xmin = tempOutput.xmin;
+ output->ymin = tempOutput.ymin;
+ output->xmax = tempOutput.xmax;
+ output->ymax = tempOutput.ymax;
+ first = false;
+ } else {
+ output->xmin = MIN2(output->xmin, tempOutput.xmin);
+ output->ymin = MIN2(output->ymin, tempOutput.ymin);
+ output->xmax = MAX2(output->xmax, tempOutput.xmax);
+ output->ymax = MAX2(output->ymax, tempOutput.ymax);
+ }
+ }
+ }
+ return !first;
+}
+
void CombineChannelsOperation::initExecution()
{
this->inputChannel1Operation = this->getInputSocketReader(0);