From d6501293e92a247ead043b4ec82ff7de2cb22235 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Wed, 27 Feb 2019 11:40:46 +0100 Subject: [PATCH] define STBI_NEON on android but disable x86 that's not compatible with the flag on clang --- android/build.gradle | 2 +- src/abr.cpp | 2 +- src/node_panel_brush.cpp | 3 ++- src/pch.h | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f3c5482..774c56a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -95,7 +95,7 @@ android { // Specifies the ABI configurations of your native // libraries Gradle should build and package with your APK. // abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a' - abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' + abiFilters 'armeabi-v7a', 'arm64-v8a' } } diff --git a/src/abr.cpp b/src/abr.cpp index 501976d..8995fdc 100644 --- a/src/abr.cpp +++ b/src/abr.cpp @@ -195,7 +195,7 @@ std::vector> ABR::compute_brushes(const std::string& path if (auto roundness = p->get("roundnessDynamics")) { - b->m_jitter_aspect = (1.f - roundness->value("jitter") * 0.01) * 0.5f + 0.5f; + b->m_jitter_aspect = roundness->value("jitter") * 0.01; } b->m_tip_randflipx = p->value("flipX"); diff --git a/src/node_panel_brush.cpp b/src/node_panel_brush.cpp index 28adde5..1a0b563 100644 --- a/src/node_panel_brush.cpp +++ b/src/node_panel_brush.cpp @@ -415,7 +415,8 @@ void NodePanelBrushPreset::init() if (!m_current) return; int index = m_container->get_child_index(m_current); - m_current->destroy(); + m_current->destroy_immediate(); + m_container->remove_child(m_current); if (m_container->m_children.empty()) { m_current = nullptr; diff --git a/src/pch.h b/src/pch.h index 61bcf04..9ef9362 100644 --- a/src/pch.h +++ b/src/pch.h @@ -52,6 +52,7 @@ #define SHADER_VERSION "#version 300 es\n" #define PP_OS "android" #define __block + #define STBI_NEON #elif _WIN32