Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

...
 
Commits (325)
#
# From https://github.com/ampl/gsl. which adds CMake support to gsl
#
if (ANDROID)
if (UNIX)
SET(EXTPREFIX_gsl "${EXTPREFIX}" )
ExternalProject_Add( ext_gsl
......
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce7a01b..b473cee 100644
index 4463476..f460d48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,11 +51,9 @@ if (has_potentially_evaluated_expression)
@@ -51,12 +51,10 @@ if (has_potentially_evaluated_expression)
add_definitions(-Wno-error=potentially-evaluated-expression)
endif()
......@@ -10,14 +10,16 @@ index ce7a01b..b473cee 100644
- find_package(PkgConfig)
- pkg_check_modules(LIBDE265 libde265)
- pkg_check_modules(X265 x265)
- pkg_check_modules(AOM aom)
-endif()
+LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
+find_package(Libde265 REQUIRED)
+find_package(X265 REQUIRED)
+find_package(Libde265)
+find_package(X265)
+find_package(AOM)
# Create libheif pkgconfig file
set(prefix ${CMAKE_INSTALL_PREFIX})
@@ -79,6 +77,10 @@ configure_file(libheif.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc @ONLY)
@@ -80,6 +78,10 @@ configure_file(libheif.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
......
......@@ -74,11 +74,11 @@ ExternalProject_Add(
)
endif(WIN32)
IF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
IF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8" AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
ExternalProject_Add(ext_libx265_10bit
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://ftp.videolan.org/pub/videolan/x265/x265_3.2.1.tar.gz
URL_MD5 94808045a34d88a857e5eaf3f68f4bca
URL https://bitbucket.org/multicoreware/x265/downloads/x265_3.4.tar.gz
URL_MD5 e37b91c1c114f8815a3f46f039fe79b5
SOURCE_SUBDIR source/
......@@ -87,8 +87,8 @@ IF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
)
ExternalProject_Add(ext_libx265_12bit
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://ftp.videolan.org/pub/videolan/x265/x265_3.2.1.tar.gz
URL_MD5 94808045a34d88a857e5eaf3f68f4bca
URL https://bitbucket.org/multicoreware/x265/downloads/x265_3.4.tar.gz
URL_MD5 e37b91c1c114f8815a3f46f039fe79b5
SOURCE_SUBDIR source/
......@@ -99,8 +99,8 @@ IF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add(
ext_libx265
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://ftp.videolan.org/pub/videolan/x265/x265_3.2.1.tar.gz
URL_MD5 94808045a34d88a857e5eaf3f68f4bca
URL https://bitbucket.org/multicoreware/x265/downloads/x265_3.4.tar.gz
URL_MD5 e37b91c1c114f8815a3f46f039fe79b5
SOURCE_SUBDIR source/
......@@ -112,14 +112,16 @@ IF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
DEPENDS ext_nasm ext_libx265_10bit ext_libx265_12bit
)
else ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
else ()
# x265 in 32-bit platforms cannot support 10-bit and 12-bit images
# because they either crash on malloc or require SSE4.1+ extensions
# Same for aarch64, support for 10-bit and 12-bit requires NEON extensions
# and these are broken as of 3.4
ExternalProject_Add(
ext_libx265
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://ftp.videolan.org/pub/videolan/x265/x265_3.2.1.tar.gz
URL_MD5 94808045a34d88a857e5eaf3f68f4bca
URL https://bitbucket.org/multicoreware/x265/downloads/x265_3.4.tar.gz
URL_MD5 e37b91c1c114f8815a3f46f039fe79b5
SOURCE_SUBDIR source/
......@@ -131,17 +133,17 @@ else ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
DEPENDS ext_nasm
)
endif ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
endif ()
ExternalProject_Add(
ext_libheif
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://github.com/strukturag/libheif/releases/download/v1.6.2/libheif-1.6.2.tar.gz
URL_HASH SHA256=bb229e855621deb374f61bee95c4642f60c2a2496bded35df3d3c42cc6d8eefc
URL https://github.com/strukturag/libheif/releases/download/v1.7.0/libheif-1.7.0.tar.gz
URL_HASH SHA256=842a9ab4b8d6f0faf5a6dc5e8507321199ec44c0b1d8eb199f2de9b49e2db092
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/03-fix-build-macos-windows.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_EXAMPLES=ON ${GLOBAL_PROFILE}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_EXAMPLES=OFF ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
DEPENDS ext_libde265 ext_libx265 ext_jpeg ext_png
......
......@@ -9,6 +9,5 @@ ExternalProject_Add( ext_openjpeg
UPDATE_COMMAND ""
ALWAYS 0
DEPENDS ext_png ext_tiff ext_lcms2 ext_zlib
DEPENDS ext_lcms2
)
From c0e035236696cd274f03ff15a7ca09d358aac9f1 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Mon, 29 Jun 2020 23:41:13 +0300
Subject: [PATCH] Don't eat ShortcutOverride events when there is a
partial-match
Some applications (e.g. Krita) may have its own shortcuts system. That
is, it should always get ShortcutOverride events, even when they are
matched to something inside Qt.
If the application (Krita) accepts the event, then all the partially
matched shortcuts should reset.
See this bug for more details:
https://bugs.kde.org/show_bug.cgi?id=409613
---
src/gui/kernel/qshortcutmap_p.h | 4 +++-
src/gui/kernel/qwindowsysteminterface.cpp | 10 ++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/gui/kernel/qshortcutmap_p.h b/src/gui/kernel/qshortcutmap_p.h
index 8fc68229..91191288 100644
--- a/src/gui/kernel/qshortcutmap_p.h
+++ b/src/gui/kernel/qshortcutmap_p.h
@@ -91,8 +91,10 @@ public:
void dumpMap() const;
#endif
-private:
void resetState();
+
+private:
+
QKeySequence::SequenceMatch nextState(QKeyEvent *e);
void dispatchEvent(QKeyEvent *e);
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index b3b6167c..9bb43f2a 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -441,7 +441,8 @@ bool QWindowSystemInterface::handleShortcutEvent(QWindow *window, ulong timestam
window = QGuiApplication::focusWindow();
QShortcutMap &shortcutMap = QGuiApplicationPrivate::instance()->shortcutMap;
- if (shortcutMap.state() == QKeySequence::NoMatch) {
+ if (shortcutMap.state() != QKeySequence::ExactMatch) {
+
// Check if the shortcut is overridden by some object in the event delivery path (typically the focus object).
// If so, we should not look up the shortcut in the shortcut map, but instead deliver the event as a regular
// key event, so that the target that accepted the shortcut override event can handle it. Note that we only
@@ -451,8 +452,13 @@ bool QWindowSystemInterface::handleShortcutEvent(QWindow *window, ulong timestam
QEvent::ShortcutOverride, keyCode, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorepeat, count);
{
- if (QWindowSystemInterfacePrivate::handleWindowSystemEvent<SynchronousDelivery>(shortcutOverrideEvent))
+ if (QWindowSystemInterfacePrivate::handleWindowSystemEvent<SynchronousDelivery>(shortcutOverrideEvent)) {
+ if (shortcutMap.state() != QKeySequence::NoMatch) {
+ shortcutMap.resetState();
+ }
+
return false;
+ }
}
}
--
2.20.1.windows.1
......@@ -77,6 +77,7 @@ if (WIN32)
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0081-Fix-no-warning-for-overwriting-files-in-non-native-d.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0082-Make-jp-e-g-default-extensions-context-aware.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0100-Fix-artifacts-when-rendering-multisubpath-dashed-QPa.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0101-Don-t-eat-ShortcutOverride-events-when-there-is-a-pa.patch
# COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0031-Compute-logical-DPI-on-a-per-screen-basis.patch
# COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0032-Update-Dpi-and-scale-factor-computation.patch
# COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0033-Move-QT_FONT_DPI-to-cross-platform-code.patch
......@@ -130,7 +131,7 @@ elseif (ANDROID)
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0046-Android-return-the-actual-file-name-the-URI-is-point.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0105-Android-Don-t-hide-Menubar-even-if-MenuKey-is-presen.patch
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -verbose -nomake examples -nomake tests -nomake tools -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard -skip qtmultimedia -android-sdk ${ANDROID_SDK_ROOT} -android-ndk ${CMAKE_ANDROID_NDK} -android-arch ${ANDROID_ABI} -xplatform android-clang -android-ndk-platform android-21 -make libs
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -verbose -nomake examples -nomake tests -nomake tools -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard -with qtmultimedia -android-sdk ${ANDROID_SDK_ROOT} -android-ndk ${CMAKE_ANDROID_NDK} -android-arch ${ANDROID_ABI} -xplatform android-clang -android-ndk-platform android-21 -make libs
INSTALL_DIR ${EXTPREFIX_qt}
BUILD_COMMAND $(MAKE)
......@@ -150,10 +151,11 @@ elseif (NOT APPLE)
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0081-Fix-no-warning-for-overwriting-files-in-non-native-d.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0082-Make-jp-e-g-default-extensions-context-aware.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0100-Fix-artifacts-when-rendering-multisubpath-dashed-QPa.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0101-Don-t-eat-ShortcutOverride-events-when-there-is-a-pa.patch
CMAKE_ARGS -DOPENSSL_LIBS='-L${EXTPREFIX_qt}/lib -lssl -lcrypto'
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -openssl-linked -verbose -nomake examples -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard -skip qtmultimedia
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -openssl-linked -verbose -nomake examples -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard
INSTALL_DIR ${EXTPREFIX_qt}
BUILD_COMMAND $(MAKE)
......@@ -257,6 +259,7 @@ else( APPLE )
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0081-Fix-no-warning-for-overwriting-files-in-non-native-d.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0082-Make-jp-e-g-default-extensions-context-aware.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0100-Fix-artifacts-when-rendering-multisubpath-dashed-QPa.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0101-Don-t-eat-ShortcutOverride-events-when-there-is-a-pa.patch
#COMMAND ${PATCH_COMMAND} -p1 -b -d <SOURCE_DIR>/qtbase/mkspecs/features/mac -i ${CMAKE_CURRENT_SOURCE_DIR}/mac-default.patch
)
......@@ -269,6 +272,7 @@ else( APPLE )
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0081-Fix-no-warning-for-overwriting-files-in-non-native-d.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0082-Make-jp-e-g-default-extensions-context-aware.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0100-Fix-artifacts-when-rendering-multisubpath-dashed-QPa.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0101-Don-t-eat-ShortcutOverride-events-when-there-is-a-pa.patch
)
endif()
......
......@@ -75,20 +75,20 @@ endif()
# define common versions of Krita applications, used to generate kritaversion.h
# update these version for every release:
set(KRITA_VERSION_STRING "4.3.0-beta2")
set(KRITA_VERSION_STRING "4.3.1-alpha")
# Major version: 3 for 3.x, 4 for 4.x, etc.
set(KRITA_STABLE_VERSION_MAJOR 4)
# Minor version: 0 for 4.0, 1 for 4.1, etc.
set(KRITA_STABLE_VERSION_MINOR 3)
# Bugfix release version, or 0 for before the first stable release
set(KRITA_VERSION_RELEASE 0)
set(KRITA_VERSION_RELEASE 1)
# the 4th digit, really only used for the Windows installer:
# - [Pre-]Alpha: Starts from 0, increment 1 per release
# - Beta: Starts from 50, increment 1 per release
# - Stable: Set to 100, bump to 101 if emergency update is needed
set(KRITA_VERSION_REVISION 0)
#set(KRITA_ALPHA 1) # uncomment only for Alpha
set(KRITA_BETA 1) # uncomment only for Beta
set(KRITA_ALPHA 1) # uncomment only for Alpha
#set(KRITA_BETA 1) # uncomment only for Beta
#set(KRITA_RC 1) # uncomment only for RC
if(NOT DEFINED KRITA_ALPHA AND NOT DEFINED KRITA_BETA AND NOT DEFINED KRITA_RC)
......
......@@ -9,7 +9,7 @@
Krita is a free and open source digital painting application. It is for artists who want to create professional work from start to end. Krita is used by comic book artists, illustrators, concept artists, matte and texture painters and in the digital VFX industry.
If you are reading this on Github, be aware that this is just a mirror. Our real
code repository is provided by KDE: https://invent.kde.org/kde/krita
code repository is provided by KDE: https://invent.kde.org/graphics/krita.git
![Picture](https://krita.org/wp-content/uploads/2016/04/krita-30-screenshot.jpg)
......
......@@ -37,7 +37,7 @@
void KisFloodFillBenchmark::initTestCase()
{
m_colorSpace = KoColorSpaceRegistry::instance()->rgb8();
m_device = new KisPaintDevice(m_colorSpace);
m_deviceStandardFloodFill = new KisPaintDevice(m_colorSpace);
m_color = KoColor(m_colorSpace);
QColor qcolor(Qt::red);
......@@ -47,11 +47,11 @@ void KisFloodFillBenchmark::initTestCase()
int tileh = 56;
m_color.fromQColor(QColor(0,0,0,0)); // default pixel
m_device->fill( 0,0,GMP_IMAGE_WIDTH, GMP_IMAGE_HEIGHT,m_color.data() );
m_deviceStandardFloodFill->fill( 0,0,GMP_IMAGE_WIDTH, GMP_IMAGE_HEIGHT,m_color.data() );
// fill the image with red ellipses (like some random dabs)
m_color.fromQColor(Qt::red);
KisPainter painter(m_device);
KisPainter painter(m_deviceStandardFloodFill);
painter.setFillStyle(KisPainter::FillStyleForegroundColor);
painter.setPaintColor(m_color);
......@@ -64,6 +64,23 @@ void KisFloodFillBenchmark::initTestCase()
painter.paintEllipse(x+ 10, y+ 10, tilew, tileh);
}
// copy to other tests
m_deviceWithoutSelectionAsBoundary = new KisPaintDevice(m_colorSpace);
m_deviceWithSelectionAsBoundary = new KisPaintDevice(m_colorSpace);
KisPainter::copyAreaOptimized(QPoint(), m_deviceStandardFloodFill,
m_deviceWithoutSelectionAsBoundary, m_deviceWithoutSelectionAsBoundary->exactBounds());
KisPainter::copyAreaOptimized(QPoint(), m_deviceStandardFloodFill,
m_deviceWithSelectionAsBoundary, m_deviceWithSelectionAsBoundary->exactBounds());
//m_deviceWithoutSelectionAsBoundary = m_deviceStandardFloodFill->
const KoColorSpace* alphacs = KoColorSpaceRegistry::instance()->alpha8();
KoColor defaultSelected = KoColor(alphacs);
defaultSelected.fromQColor(QColor(255, 255, 255));
m_existingSelection = new KisPaintDevice(alphacs);
m_existingSelection->fill(0, 0, GMP_IMAGE_WIDTH, GMP_IMAGE_HEIGHT, defaultSelected.data());
}
......@@ -76,7 +93,7 @@ void KisFloodFillBenchmark::benchmarkFlood()
QBENCHMARK
{
KisFillPainter fillPainter(m_device);
KisFillPainter fillPainter(m_deviceStandardFloodFill);
//setupPainter(&fillPainter);
fillPainter.setPaintColor( fg );
fillPainter.setBackgroundColor( bg );
......@@ -93,7 +110,7 @@ void KisFloodFillBenchmark::benchmarkFlood()
fillPainter.setHeight(GMP_IMAGE_HEIGHT);
// fill twice
fillPainter.fillColor(1, 1, m_device);
fillPainter.fillColor(1, 1, m_deviceStandardFloodFill);
fillPainter.deleteTransaction();
}
......@@ -103,6 +120,66 @@ void KisFloodFillBenchmark::benchmarkFlood()
//out.save("fill_output.png");
}
void KisFloodFillBenchmark::benchmarkFloodWithoutSelectionAsBoundary()
{
KoColor fg(m_colorSpace);
KoColor bg(m_colorSpace);
fg.fromQColor(Qt::blue);
bg.fromQColor(Qt::black);
QBENCHMARK
{
KisFillPainter fillPainter(m_deviceWithoutSelectionAsBoundary);
fillPainter.setPaintColor( fg );
fillPainter.setBackgroundColor( bg );
fillPainter.beginTransaction(kundo2_noi18n("Flood Fill"));
fillPainter.setOpacity(OPACITY_OPAQUE_U8);
// default
fillPainter.setFillThreshold(15);
fillPainter.setCompositeOp(COMPOSITE_OVER);
fillPainter.setCareForSelection(true);
fillPainter.setWidth(GMP_IMAGE_WIDTH);
fillPainter.setHeight(GMP_IMAGE_HEIGHT);
fillPainter.setUseSelectionAsBoundary(false);
fillPainter.createFloodSelection(1, 1, m_deviceWithoutSelectionAsBoundary, m_existingSelection);
fillPainter.deleteTransaction();
}
}
void KisFloodFillBenchmark::benchmarkFloodWithSelectionAsBoundary()
{
KoColor fg(m_colorSpace);
KoColor bg(m_colorSpace);
fg.fromQColor(Qt::blue);
bg.fromQColor(Qt::black);
QBENCHMARK
{
KisFillPainter fillPainter(m_deviceWithSelectionAsBoundary);
fillPainter.setPaintColor( fg );
fillPainter.setBackgroundColor( bg );
fillPainter.beginTransaction(kundo2_noi18n("Flood Fill"));
fillPainter.setOpacity(OPACITY_OPAQUE_U8);
// default
fillPainter.setFillThreshold(15);
fillPainter.setCompositeOp(COMPOSITE_OVER);
fillPainter.setCareForSelection(true);
fillPainter.setWidth(GMP_IMAGE_WIDTH);
fillPainter.setHeight(GMP_IMAGE_HEIGHT);
fillPainter.setUseSelectionAsBoundary(true);
fillPainter.createFloodSelection(1, 1, m_deviceWithSelectionAsBoundary, m_existingSelection);
fillPainter.deleteTransaction();
}
}
void KisFloodFillBenchmark::cleanupTestCase()
{
......
......@@ -33,7 +33,10 @@ class KisFloodFillBenchmark : public QObject
private:
const KoColorSpace * m_colorSpace;
KoColor m_color;
KisPaintDeviceSP m_device;
KisPaintDeviceSP m_deviceStandardFloodFill;
KisPaintDeviceSP m_deviceWithSelectionAsBoundary;
KisPaintDeviceSP m_deviceWithoutSelectionAsBoundary;
KisPaintDeviceSP m_existingSelection;
int m_startX;
int m_startY;
......@@ -42,6 +45,9 @@ private Q_SLOTS:
void cleanupTestCase();
void benchmarkFlood();
void benchmarkFloodWithoutSelectionAsBoundary();
void benchmarkFloodWithSelectionAsBoundary();
......
......@@ -49,13 +49,13 @@ void KisRandomIteratorBenchmark::cleanupTestCase()
void KisRandomIteratorBenchmark::benchmarkCreation()
{
QBENCHMARK{
KisRandomAccessorSP it = m_device->createRandomAccessorNG(0,0);
KisRandomAccessorSP it = m_device->createRandomAccessorNG();
}
}
void KisRandomIteratorBenchmark::benchmarkWriteBytes()
{
KisRandomAccessorSP it = m_device->createRandomAccessorNG(0,0);
KisRandomAccessorSP it = m_device->createRandomAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......@@ -70,7 +70,7 @@ void KisRandomIteratorBenchmark::benchmarkWriteBytes()
void KisRandomIteratorBenchmark::benchmarkReadBytes()
{
KisRandomAccessorSP it = m_device->createRandomAccessorNG(0,0);
KisRandomAccessorSP it = m_device->createRandomAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......@@ -85,7 +85,7 @@ void KisRandomIteratorBenchmark::benchmarkReadBytes()
void KisRandomIteratorBenchmark::benchmarkConstReadBytes()
{
KisRandomConstAccessorSP it = m_device->createRandomConstAccessorNG(0,0);
KisRandomConstAccessorSP it = m_device->createRandomConstAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......@@ -103,8 +103,8 @@ void KisRandomIteratorBenchmark::benchmarkReadWriteBytes(){
KisPaintDevice dab(m_colorSpace);
dab.fill(0,0,TEST_IMAGE_WIDTH,TEST_IMAGE_HEIGHT, c.data());
KisRandomAccessorSP writeIterator = m_device->createRandomAccessorNG(0,0);
KisRandomConstAccessorSP constReadIterator = dab.createRandomConstAccessorNG(0,0);
KisRandomAccessorSP writeIterator = m_device->createRandomAccessorNG();
KisRandomConstAccessorSP constReadIterator = dab.createRandomConstAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......@@ -121,7 +121,7 @@ void KisRandomIteratorBenchmark::benchmarkReadWriteBytes(){
void KisRandomIteratorBenchmark::benchmarkTotalRandom()
{
KisRandomAccessorSP it = m_device->createRandomAccessorNG(0,0);
KisRandomAccessorSP it = m_device->createRandomAccessorNG();
// set the seed so that we always go in the same permutation over the device
srand(123456);
......@@ -138,7 +138,7 @@ void KisRandomIteratorBenchmark::benchmarkTotalRandom()
void KisRandomIteratorBenchmark::benchmarkTotalRandomConst()
{
KisRandomConstAccessorSP it = m_device->createRandomConstAccessorNG(0,0);
KisRandomConstAccessorSP it = m_device->createRandomConstAccessorNG();
// set the seed so that we always go in the same permutation over the device
srand(123456);
......@@ -157,7 +157,7 @@ void KisRandomIteratorBenchmark::benchmarkTotalRandomConst()
void KisRandomIteratorBenchmark::benchmarkNoMemCpy()
{
KisRandomAccessorSP it = m_device->createRandomAccessorNG(0,0);
KisRandomAccessorSP it = m_device->createRandomAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......@@ -171,7 +171,7 @@ void KisRandomIteratorBenchmark::benchmarkNoMemCpy()
void KisRandomIteratorBenchmark::benchmarkConstNoMemCpy()
{
KisRandomConstAccessorSP it = m_device->createRandomConstAccessorNG(0,0);
KisRandomConstAccessorSP it = m_device->createRandomConstAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......@@ -196,7 +196,7 @@ void KisRandomIteratorBenchmark::benchmarkTileByTileWrite()
dbgKrita << "There will be some unprocessed pixels! Test area differs from the image size";
}
KisRandomAccessorSP it = m_device->createRandomAccessorNG(0,0);
KisRandomAccessorSP it = m_device->createRandomAccessorNG();
QBENCHMARK{
for (int yTile = 0; yTile < yTiles; yTile++){
for (int xTile = 0; xTile < xTiles; xTile++){
......@@ -221,8 +221,8 @@ void KisRandomIteratorBenchmark::benchmarkTwoIteratorsNoMemCpy()
KisPaintDevice dab(m_colorSpace);
dab.fill(0,0,TEST_IMAGE_WIDTH,TEST_IMAGE_HEIGHT, c.data());
KisRandomAccessorSP writeIterator = m_device->createRandomAccessorNG(0,0);
KisRandomConstAccessorSP constReadIterator = dab.createRandomConstAccessorNG(0,0);
KisRandomAccessorSP writeIterator = m_device->createRandomAccessorNG();
KisRandomConstAccessorSP constReadIterator = dab.createRandomConstAccessorNG();
QBENCHMARK{
for (int i = 0; i < TEST_IMAGE_HEIGHT; i++){
......
......@@ -104,7 +104,17 @@ if (APPLE)
set_target_properties(krita PROPERTIES MACOSX_BUNDLE_COPYRIGHT "GNU Public License, V2 or, at your option, any later version.")
endif ()
set(KRITAVERSION_SRCS kritaversion.cpp)
add_executable(krita_version ${KRITAVERSION_SRCS})
target_link_libraries(krita_version
PRIVATE
Qt5::Core
kritaversion
)
install(TARGETS krita ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS krita_version ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.krita.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES krita.action kritamenu.action DESTINATION ${DATA_INSTALL_DIR}/krita/actions)
install(FILES org.kde.krita.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
......
install( FILES
InteractionTool.action
PathTool.action
ConnectionTool.action
MoveTool.action
DESTINATION ${DATA_INSTALL_DIR}/krita/actions)
<!-- Disabled, since Connection Tool is disabled in Krita
<?xml version="1.0" encoding="UTF-8"?>
<ActionCollection version="2" name="Tools">
<Actions category="connection-tool">
<text>Connection Tool</text>
<Action name="toggle-edit-mode">
<iconText>Edit connection points</iconText>
<shortcut></shortcut>
<toolTip>Edit connection points</toolTip>
<icon>path-break-segment</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Edit connection points</text>
</Action>
<Action name="align-relative">
<iconText>%</iconText>
<shortcut></shortcut>
<toolTip>%</toolTip>
<icon>path-break-segment</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>%</text>
</Action>
<Action name="align-left">
<iconText>Align to left edge</iconText>
<shortcut></shortcut>
<toolTip>Align to left edge</toolTip>
<icon>align-horizontal-left</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Align to left edge</text>
</Action>
<Action name="align-centerh">
<iconText>Align to horizontal center</iconText>
<shortcut></shortcut>
<toolTip>Align to horizontal center</toolTip>
<icon>align-horizontal-center</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Align to horizontal center</text>
</Action>
<Action name="align-right">
<iconText>Align to right edge</iconText>
<shortcut></shortcut>
<toolTip>Align to right edge</toolTip>
<icon>align-horizontal-right</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Align to right edge</text>
</Action>
<Action name="align-top">
<iconText>Align to top edge</iconText>
<shortcut></shortcut>
<toolTip>Align to top edge</toolTip>
<icon>align-vertical-top</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Align to top edge</text>
</Action>
<Action name="align-centerv">
<iconText>Align to vertical center</iconText>
<shortcut></shortcut>
<toolTip>Align to vertical center</toolTip>
<icon>align-vertical-center</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Align to vertical center</text>
</Action>
<Action name="align-bottom">
<iconText>Align to bottom edge</iconText>
<shortcut></shortcut>
<toolTip>Align to bottom edge</toolTip>
<icon>align-vertical-bottom</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Align to bottom edge</text>
</Action>
<Action name="escape-all">
<iconText>Escape in all directions</iconText>
<shortcut></shortcut>
<toolTip>Escape in all directions</toolTip>
<icon>escape-direction-all</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Escape in all directions</text>
</Action>
<Action name="escape-horizontal">
<iconText>Escape in horizontal directions</iconText>
<shortcut></shortcut>
<toolTip>Escape in horizontal directions</toolTip>
<icon>escape-direction-horizontal</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Escape in horizontal directions</text>
</Action>
<Action name="escape-vertical">
<iconText>Escape in vertical directions</iconText>
<shortcut></shortcut>
<toolTip>Escape in vertical directions</toolTip>
<icon>escape-direction-vertical</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Escape in vertical directions</text>
</Action>
<Action name="escape-left">
<iconText>Escape in left direction</iconText>
<shortcut></shortcut>
<toolTip>Escape in left direction</toolTip>
<icon>escape-direction-left</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Escape in left direction</text>
</Action>
<Action name="escape-right">
<iconText>Escape in right direction</iconText>
<shortcut></shortcut>
<toolTip>Escape in right direction</toolTip>
<icon>escape-direction-right</icon>
<whatsThis></whatsThis>