File indexing completed on 2024-05-12 15:58:45
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_THREADED_TEXT_RENDERING_WORKAROUND_H 0008 #define __KIS_THREADED_TEXT_RENDERING_WORKAROUND_H 0009 0010 /** 0011 * There is a bug in Qt/X11 which prevents the QPainter::drawText() call 0012 * be used in any non-gui thread, even when 0013 * QFontDatabase::supportsThreadedFontRendering() returns true. It seems 0014 * like some function in the font rendering routine eats the X11 replies 0015 * which are awaited by the GUI thread, effectively making the GUI thread 0016 * to hang up. The hangup happens in xcb_wait_for_reply(). 0017 * 0018 * This dirty workaround makes the text brush be initialized in the 0019 * GUI thread, saved to a global singleton and then fetched by the 0020 * threaded code in the paintop. Yes, that is weird, but this is the 0021 * best thing we can do right now :( 0022 * 0023 * \see bug 330492 0024 */ 0025 0026 #ifdef HAVE_X11 0027 #define HAVE_THREADED_TEXT_RENDERING_WORKAROUND 0028 #endif 0029 0030 #endif /* __KIS_THREADED_TEXT_RENDERING_WORKAROUND_H */