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 <jbakker>2021-12-07 12:14:27 +0300
committerJeroen Bakker <jeroen@blender.org>2021-12-07 12:33:23 +0300
commite2f0b4a0cbe5934dbd591caa53f9259eee431cee (patch)
tree7afb67d5b4add1b8f1f4512353afb2d249f15904 /source/blender/blenlib/intern
parent1de363662427ff66693106b4bbde46337d651842 (diff)
Cleanup: Use rcti marking dirty regions when texture painting.
Dirty regions when painting are not using rcti. Meaning less understandable code. Found issue when refactoring the image_gpu partial update. In a future change gpu partial update API will be using rcti also what makes the code even cleaner. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D13260
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/rct.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index b73c5865e1a..6bbe655b1cd 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -30,6 +30,7 @@
#include <float.h>
#include <limits.h>
+#include "BLI_math_base.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
@@ -541,6 +542,14 @@ void BLI_rcti_do_minmax_v(rcti *rect, const int xy[2])
}
}
+void BLI_rcti_do_minmax_rcti(rcti *rect, const rcti *other)
+{
+ rect->xmin = min_ii(rect->xmin, other->xmin);
+ rect->xmax = max_ii(rect->xmax, other->xmax);
+ rect->ymin = min_ii(rect->ymin, other->ymin);
+ rect->ymax = max_ii(rect->ymax, other->ymax);
+}
+
void BLI_rctf_do_minmax_v(rctf *rect, const float xy[2])
{
if (xy[0] < rect->xmin) {