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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-10-22 16:12:30 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-10-22 16:12:30 +0300
commit658370e9e1c213455b3f3905a72f9965e807086e (patch)
tree4ccf904c46c4250b53f3e2898d9a09154ce4ffeb
parentdea3b8d9844f1487fc2effbb26f2e9d607c3b0fd (diff)
parentc9550cb1209a716c0a14264e88efb6bcab48ece3 (diff)
Merge branch 'blender-v2.91-release'
-rw-r--r--release/scripts/startup/bl_ui/space_image.py2
-rw-r--r--source/blender/imbuf/intern/util_gpu.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 9c6ad39e25b..f4e88b70281 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -1521,8 +1521,6 @@ class IMAGE_PT_overlay_uv_edit_geometry(Panel):
col = layout.column()
col.prop(uvedit, "uv_opacity")
col.prop(uvedit, "edge_display_type", text="")
- if context.preferences.experimental.use_image_editor_legacy_drawing:
- col.prop(uvedit, "show_smooth_edges", text="Smooth")
col.prop(uvedit, "show_modified_edges", text="Modified Edges")
# Faces
diff --git a/source/blender/imbuf/intern/util_gpu.c b/source/blender/imbuf/intern/util_gpu.c
index 2826bd63cc1..607ab95f0b4 100644
--- a/source/blender/imbuf/intern/util_gpu.c
+++ b/source/blender/imbuf/intern/util_gpu.c
@@ -97,6 +97,7 @@ static void *imb_gpu_get_data(const ImBuf *ibuf,
{
const bool is_float_rect = (ibuf->rect_float != NULL);
void *data_rect = (is_float_rect) ? (void *)ibuf->rect_float : (void *)ibuf->rect;
+ bool freedata = false;
if (is_float_rect) {
/* Float image is already in scene linear colorspace or non-color data by
@@ -104,7 +105,7 @@ static void *imb_gpu_get_data(const ImBuf *ibuf,
* currently. */
if (ibuf->channels != 4 || !store_premultiplied) {
data_rect = MEM_mallocN(sizeof(float[4]) * ibuf->x * ibuf->y, __func__);
- *r_freedata = true;
+ *r_freedata = freedata = true;
if (data_rect == NULL) {
return NULL;
@@ -124,7 +125,7 @@ static void *imb_gpu_get_data(const ImBuf *ibuf,
* and consistency with float images. */
if (!IMB_colormanagement_space_is_data(ibuf->rect_colorspace)) {
data_rect = MEM_mallocN(sizeof(uchar[4]) * ibuf->x * ibuf->y, __func__);
- *r_freedata = true;
+ *r_freedata = freedata = true;
if (data_rect == NULL) {
return NULL;
@@ -147,6 +148,10 @@ static void *imb_gpu_get_data(const ImBuf *ibuf,
ImBuf *scale_ibuf = IMB_allocFromBuffer(rect, rect_float, ibuf->x, ibuf->y, 4);
IMB_scaleImBuf(scale_ibuf, UNPACK2(rescale_size));
+ if (freedata) {
+ MEM_freeN(data_rect);
+ }
+
data_rect = (is_float_rect) ? (void *)scale_ibuf->rect_float : (void *)scale_ibuf->rect;
*r_freedata = true;
/* Steal the rescaled buffer to avoid double free. */