[krita] 3rdparty/ext_qt: Fix a "bended lines"+AMD+Qt5.6 bug

Fazekas László mneko at freemail.hu
Thu Apr 21 04:16:22 UTC 2016


Hello Dmitry,

I assume this is about the mouse positions on the window.

Isn't there a way to read the X events directly? Not checked but perhaps 
you are doing something similar with wintab already?

Just another thing, this annoys me in many (if not all) programs. If you 
are using a tablet's stylus, it disables the mouse completely. This is 
not a good thing. Sometimes the tip of the stylus is not accurate 
enough, so better to use the stylus in proximity and press the buttons 
on the mouse. I'm left handed, so I'm holding the stylus in my left hand 
and the mouse in my right hand. It's very effective. I can use the wheel 
on the mouse the same way. This is not a technical limitation, I already 
made programs with this feature (but not with Qt...).

What I want to say is, maybe Krita's needs are too special about the 
mouse and the tablet events, so it's not a good idea to use Qt's solutions.

Fazek


2016-04-20 22:41 keltezéssel, Dmitry Kazakov írta:
> Git commit 31195a85a054e50af2d61ae764f341db12190f1e by Dmitry Kazakov.
> Committed on 20/04/2016 at 20:03.
> Pushed by dkazakov into branch 'master'.
>
> Fix a "bended lines"+AMD+Qt5.6 bug
>
> The bug is actually in Qt 5.6. They decided to implement a motion event
> compression without *any* way to disable it. So we have a lot of events
> dropped resulting in "bended lines" on canvas.
>
> For some reason the bug is reproducible on AMD GPUs only, with openGL
> activated. It seems like either Qt asks for some synchronization, or
> rendering on AMD is just too slow. I don't know the exact reason,
> but being busy with rendering makes Qt drop a lot of events.
>
> Since this event compression cannot be disabled in any official way, we
> should start patching Qt on Linux as well. Yes, it means that Krita 3.0
> cannot be distributed through official distribution repositories. Which
> means that Krita Lime will have to be shut down as soon as Ubuntu 16.04
> will upgrade to Qt 5.6.
>
> CC:kimageshop at kde.org
> CC:Shawn.Rutledge at theqtcompany.com
> BUG:361619
> Fixes T2224
>
> M  +1    -0    3rdparty/ext_qt/CMakeLists.txt
> A  +20   -0    3rdparty/ext_qt/qt-no-motion-compression.diff
>
> http://commits.kde.org/krita/31195a85a054e50af2d61ae764f341db12190f1e
>
> diff --git a/3rdparty/ext_qt/CMakeLists.txt b/3rdparty/ext_qt/CMakeLists.txt
> index 78146a5..8fa3ba3 100644
> --- a/3rdparty/ext_qt/CMakeLists.txt
> +++ b/3rdparty/ext_qt/CMakeLists.txt
> @@ -7,6 +7,7 @@ ExternalProject_Add(
>       URL_MD5 03402708f260dcc917abae9bc559c1df
>       PATCH_COMMAND myptch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/disable-wintab.diff
>             COMMAND myptch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qtgui-private-headers.diff
> +          COMMAND myptch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt-no-motion-compression.diff
>   
>       INSTALL_DIR ${EXTPREFIX_qt}
>       CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix ${EXTPREFIX_qt}
> diff --git a/3rdparty/ext_qt/qt-no-motion-compression.diff b/3rdparty/ext_qt/qt-no-motion-compression.diff
> new file mode 100644
> index 0000000..bac2995
> --- /dev/null
> +++ b/3rdparty/ext_qt/qt-no-motion-compression.diff
> @@ -0,0 +1,20 @@
> +diff --git a/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp b/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp
> +index 05c0224..8fa9345 100644
> +--- a/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp
> ++++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp
> +@@ -1687,8 +1687,13 @@ void QXcbConnection::processXcbEvents()
> +             continue;
> +         }
> +
> +-        if (compressEvent(event, i, eventqueue))
> +-            continue;
> ++
> ++        /**
> ++         * (Krita) Do *NOT* compress any motion events! This is the
> ++         * most weird thing one can do for a painting application!
> ++         */
> ++        // if (compressEvent(event, i, eventqueue))
> ++        //     continue;
> +
> +         bool accepted = false;
> +         if (clipboard()->processIncr())
> _______________________________________________
> Krita mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop



More information about the kimageshop mailing list