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:
authorStefan Werner <stewreo@gmail.com>2020-07-16 10:41:17 +0300
committerStefan Werner <stewreo@gmail.com>2020-07-16 10:41:17 +0300
commit14b888afea11b2a086983b4f2bb8f5e9dede935f (patch)
tree9a68c332ede76d239ee45e970171df6864bf4633
parenta2638d0f410770eab53dc2c65c69c1bf4db3fdf2 (diff)
parent9715ad5acad9a42b65efd64b6c7fbe157f949bfb (diff)
Merge branch 'master' into mac_arm64mac_arm64
-rw-r--r--build_files/build_environment/cmake/sqlite.cmake2
-rw-r--r--build_files/build_environment/cmake/ssl.cmake6
-rw-r--r--source/blender/editors/interface/interface_align.c16
-rw-r--r--source/blender/editors/interface/interface_layout.c7
4 files changed, 22 insertions, 9 deletions
diff --git a/build_files/build_environment/cmake/sqlite.cmake b/build_files/build_environment/cmake/sqlite.cmake
index f4a124b9f26..90330c68811 100644
--- a/build_files/build_environment/cmake/sqlite.cmake
+++ b/build_files/build_environment/cmake/sqlite.cmake
@@ -51,7 +51,7 @@ ExternalProject_Add(external_sqlite
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
- PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
+ PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
diff --git a/build_files/build_environment/cmake/ssl.cmake b/build_files/build_environment/cmake/ssl.cmake
index b7d0fd9e097..e1c168817f4 100644
--- a/build_files/build_environment/cmake/ssl.cmake
+++ b/build_files/build_environment/cmake/ssl.cmake
@@ -20,11 +20,7 @@ set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
- if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
- set(SSL_OS_COMPILER "blender-darwin-arm64")
- else()
- set(SSL_OS_COMPILER "blender-darwin-x86_64")
- endif()
+ set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c
index 59436276277..8edae5d8740 100644
--- a/source/blender/editors/interface/interface_align.c
+++ b/source/blender/editors/interface/interface_align.c
@@ -31,6 +31,8 @@
#include "interface_intern.h"
+#include "MEM_guardedalloc.h"
+
#ifdef USE_UIBUT_SPATIAL_ALIGN
/**
@@ -416,7 +418,16 @@ void ui_block_align_calc(uiBlock *block, const ARegion *region)
return;
}
- butal_array = alloca(sizeof(*butal_array) * (size_t)num_buttons);
+ /* Note that this is typically less than ~20, and almost always under ~100.
+ * Even so, we can't ensure this value won't exceed available stack memory.
+ * Fallback to allocation instead of using #alloca, see: T78636. */
+ ButAlign butal_array_buf[256];
+ if (num_buttons <= ARRAY_SIZE(butal_array_buf)) {
+ butal_array = butal_array_buf;
+ }
+ else {
+ butal_array = MEM_mallocN(sizeof(*butal_array) * num_buttons, __func__);
+ }
memset(butal_array, 0, sizeof(*butal_array) * (size_t)num_buttons);
/* Second loop: we initialize our ButAlign data for each button. */
@@ -515,6 +526,9 @@ void ui_block_align_calc(uiBlock *block, const ARegion *region)
}
}
}
+ if (butal_array_buf != butal_array) {
+ MEM_freeN(butal_array);
+ }
}
# undef SIDE_TO_UI_BUT_ALIGN
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 858b48ba9fa..f027a62cbfd 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -947,8 +947,11 @@ static uiBut *ui_item_with_label(uiLayout *layout,
const bool use_prop_sep = ((layout->item.flag & UI_ITEM_PROP_SEP) != 0);
#endif
- /* Always align item with label since text is already given enough space not to overlap. */
- sub = uiLayoutRow(layout, true);
+ /* Previously 'align' was enabled to make sure the label is spaced closely to the button.
+ * Set the space to zero instead as aligning a large number of labels can end up aligning
+ * thousands of buttons when displaying key-map search (a heavy operation), see: T78636. */
+ sub = uiLayoutRow(layout, false);
+ sub->space = 0;
UI_block_layout_set_current(block, sub);
#ifdef UI_PROP_DECORATE