By using XAML as the platform compositor, many benefits are possible:
- Better input context handling for tablets
- Better multiple window support (including non-fullscreen windows)
- Support for transparent windows and window opacity
- Integration with native platform controls
- Simpler orientation handling on Windows Phone with built-in transitions
This patch applies only the minimal parts to make XAML mode work just as
the raw D3D mode. It does this by:
- Moving all OpenGL parts into QWinRTEGLContext. This will allow us to
have non-OpenGL windows later (e.g. Direct2D raster surfaces).
- Moving more window-specific parts into QWinRTWindow. Each window creates
a SwapChainPanel which can then be used for ANGLE (or Direct2D) content.
- Moving non screen-specific parts into QWinRTIntegration.
- Having QWinRTScreen create the base XAML element Canvas.
- Running certain calls on the UI thread where necessary.
The following code parts were removed:
- The UIAutomationCore code in QWinRTInputContext, as this is incompatible
with XAML automation.
- The D3D Trim and device blacklist, as these have been fixed in ANGLE.
- Core dispatcher processing in QEventDispatcherWinRT. Now there is only
one native event dispatcher; it is always running and never needs to be
pumped.
Future commits should address:
- Maintaining the window stack list and visibility using the XAML Canvas.
- Allowing for windows (e.g. popups) to be sized and positioned instead
of fullscreen.
- Using the XAML automation API to improve the platform input context.
[ChangeLog][QPA][winrt] Windows Store apps are now composited inside a
XAML container, allowing for tighter integration with the native UI layer.
Change-Id: I285c6dea657c5dab2fda2b1bd8e8e5dd15882c72
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the platform plugin to start using XAML interfaces in the
windowing system.
Change-Id: Ifcd29b8b8d83b138af69786dfc6a1adec21be37e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This is necessary for Qt applications, as they render to GL in physical
pixels. This is consistent with the CoreWindow swap chain behavior.
This includes a partial revert of "ANGLE: Improve Windows Phone Support"
as the modifications to SwapChain11 are incompatible with the XAML swap
chain.
This change only affects Windows Runtime targets.
Change-Id: I401ae81028a9dfdb9da37f51c60844467c476f76
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the XAML swap chain to work properly, as otherwise it never
got a resize after it was passed into ANGLE with an empty size. This is
fixed by upstream commit 3799c3014a9e4ba4a3853c014a7127254ec19d50, so no
patch is necessary for Qt's local copy.
Change-Id: I43b030fa74f6b30c2aa42a36db2031a84eedf60b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows multiple applications installed into the same directory,
to share data files without polluting a more global directory
like C:/ProgramData.
Change-Id: Id5f4f9bc9d2ccb7ec677babcc08c1c5a641178f6
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
pdfork(2) has semantics very close to what we want in forkfd, but not
quite. Differences:
- we still get SIGCHLD and need to do a wait4
- no support for atomic FD_CLOEXEC and O_NONBLOCK
On the SIGCHLD case: this commit is an improvement over the generic Unix
case, since we no longer need to install a SIGCHLD handler and do not
need to keep the arrays for matching PIDs and file descriptors. That
matching is done entirely inside the kernel.
However, since SIGCHLD is still sent to the process, an uncooperative
SIGCHLD handler can still "steal" our response. At least Glib is
documented not to reap children it wasn't explicitly asked to watch for
(source code matches), but other libraries are known to do waitpid(-1)
(e.g., EFL's Ecore). At least now the behavior is consistent: we will
never install a handler, so the behavior won't depend on the order in
which the handlers are installed.
Change-Id: Iee8cbc07c4434ce9b560ffff13cb4c63306e43ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QAndroidInputContext now sends along the EnterKey type provided by the
EnterKey input method query enabling the QtActivityDelegate to set the
imeOptions for the TextView accordingly.
Change-Id: Ic96077ab4b11cf6dec52283ecf66b2cabe7af665
Reviewed-by: BogDan Vatra <bogdan@kde.org>
In C++, type punning with a union is not allowed. It will result in
compiler defined behavior at best, and undefined behavior at worst.
Specifically, if QRgba64 is passed to a function by value, the different
members of a struct might be passed in separate registers. This means
that any write to the quint64 might not blank out the values of the
struct whenever the compiler looses track with TBAA.
Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
This permits text rendering consistent with other FreeType enabled platforms,
like Windows and Linux.
Task-number: QTBUG-42839
Change-Id: I8c99bcaa3fb07c16e935a0c3705af467bc3da584
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Just like from RGB32 to RGB30 we must also repremultiply when converting
from RGB64 because the alpha channel loses more precision than the other
color channels.
Since this is not approximated accurately in the simple blending
functions and the functions are no longer needed now the main render
engine supports higher accuracy, the simple blending routines for RGB30
have been removed.
Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The type is known (usually) right after createNewSocket, so let's just
set it. They may get overwritten later (in fetchConnectionParameters),
but this allows early use of setOption when we need to know the socket
type.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca09fccb8e1662
Reviewed-by: Richard J. Moore <rich@kde.org>
And declare Qt::Uninitialized to be the same value because we're not
interested in the scoping rules of C++11 class enums. We're only
interested in avoiding the cast from Qt::Uninitialized to an integer.
That is to avoid the mistaken:
QVector<Custom> vector(5, Qt::Uninitialized);
which is actually implicitly:
QVector<Custom> vector(5, Custom(Qt::Uninitialized));
and likely not what the developer wanted.
Change-Id: I27eaacb532114dd188c4ffff13d374eb698bfbab
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This hides the call to ::grow to now two places in the source code, so
it will be easier to fix the inefficient call to qAllocMore.
Change-Id: I5d1e6f7607404caa96e4ffff13e80a3e4cb0ee93
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
It's the same as movable (i.e., the opposite of QTypeInfo::isStatic),
except that it won't trigger the QList change in memory layout.
For Qt 6, we should merge the two.
Change-Id: Ib306f8f647014b399b87ffff13f1ece29e4b6e5c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The dynamic property variants are stored as QList<QVariant>, which unfortunately
results in QList to behave as array-list because of the size of QVariant. By storing
the variants in a vector directly we can eliminate the array-list element pointers.
Change-Id: I8736e1cf48b9fc97df3007df4a439b793933f346
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
[ChangeLog][QtCore][Logging] Systems with syslog may now pass -syslog to
configure to send logging output to syslog.
Change-Id: I80d58ee6e70d8deb2409fc666e7e7f2d7f52b8e1
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
After seeing multiple apps falling into the trap of setting
AA_ShareOpenGLContexts after constructing the q(gui)app, it
is time to add some more docs regarding this.
Task-number: QTBUG-47637
Change-Id: I01b5be0980d038efc56fd649d4a1fee26c33aef8
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
1. glTexImage*D does not accept compressed formats.
2. Replacing it with glCompressedTexImage*D is not an option as per GLES 2.0 spec
since passing null data is not allowed.
3. glCompressedTexSubImage*D must always be preceded by a glCompressedTexImage*d
(or glTexStorage*D) call.
4. Therefore the only way is to do nothing in allocateStorage() and switch to
glCompressedTexImage*D in setCompressedData() whenever mutable storage is in use.
This makes ETC1 textures working on the Beaglebone (and presumably others).
Change-Id: I21a040f6ed4aecaa494b6e5a6c6cd75b7389c15c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Even if QHighDpiScaling::isActive() returns false, there
is a small overhead from calling functions and multiplying
with 1.0. This change adds a QT_NO_HIGHDPISCALING #ifdef
that replaces all conversion functions with empty inline
functions.
Task-number: QTBUG-46615
Change-Id: Idf85e1700e3adf7f7174c6fa3f5e1d006d74c826
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Use QPlatformWindow::windowGeometry() and friends
instead of the QWindow API, which now returns
(possibly scaled) values in device-independent pixels.
Rename QCocoaWindow::windowGeometry() -> nativeWindowGeometry()
Change-Id: I70279145079c3df793059d16fed9aafba2d49a6d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
bottomLeftClippedByNSWindowOffset did not take multiple clippings into
account. with this patch, we compute the offset via NSView-visibleRect.
Change-Id: If4ec02eb983e30f7cc5a6a1cb73e8f5c28fe1551
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
We create dirtyOnScreenWidgets even if QT_NO_OPENGL is defined,
but dtor deletes this object only if no QT_NO_OPENGL is defined.
Also, copy ctor/assignment operator must be disabled for such a class.
Task-number: QTBUG-47499
Change-Id: I9f8b5721ff6324fa7b28b715af68d0a5496c5eb5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Adds the drawHyperlink method so that clients can draw a hyperlink
pointing to the specified URL at the specified rectangle. That new
method is to be used by GraphicContext::setURLForRect implementations
that want to render anchors as clickable links in PDF documents.
Task-number: QTBUG-44563
Change-Id: I7b0c602da37ee157d18115c531ab1b11fe304c13
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
On mobile and embedded ETC1 (via GL_OES_compressed_ETC1_RGB8_texture) is
still the most common (and sometimes the only) option for compressed textures,
at least until GLES3 (with ETC2) becomes widely available.
Note that we treat this format as unsized to prevent going on the immutable storage
path as there is no word on glTexStorage and friends in the extension so that may
just fail as well.
Change-Id: Icbc3c6f62f314d63c4df289ef456f047c5e84cf3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Running an example like hellogles3 with eglfs and the mouse cursor visible
breaks due to the cursor implementation not being aware of vertex array
objects. The cursor drawing code uses client side pointers and having a
VAO bound breaks this. Instead, the VAO should be reset to 0.
In addition, the same applies to all touched state: naive applications
doing custom OpenGL rendering expect the state to be unchanged between
frames and this is not unreasonable. So introduce saving and restoring
for all touched state, with the exception of Quick where there is no
need to waste time with this.
Change-Id: Ib79039e80993ab5fc8368357fc1147ee7863d055
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Using QStringLiteral to compare strings performs poorly
compared to QLatin1String.
These cases were previously fixed by commit 1a5c0b26, but
some were reintroduced with new commits to QDoc.
Change-Id: I272376052e876d88817606deb0a6dda92867dcbf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
It does. When CPUID was introduced in late 486, it already supported
leaf 1. That means all Pentium-class systems (including Intel's new
Quark systems) have CPUID and they have at least leaf 1.
Change-Id: Ib306f8f647014b399b87ffff13f1d5d2530d9ddd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Task-number: QTBUG-47316
Change-Id: Ib306f8f647014b399b87ffff13f303badb2a7a63
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
[ChangeLog][Important Behavior Changes] QDebug output for QStrings
changed compared to Qt 5.5.0 to more closely match the output of
previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable
characters, the backslash and quote characters, but will no longer
escape the printable characters.
Task-number: QTBUG-47316
Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Found by ICC
qglengineshadermanager.cpp(427): warning #177: variable "none" was declared but never referenced
Change-Id: Id3d5c7bf4d4c45069621ffff13f758ffaf1744d7
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
The platform message dialogs are always used on WP.
Change-Id: If55e1ea804981201fded796adaaf11eb17bc5050
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Since 8.1, DirectWrite is always used on WinRT platforms.
Change-Id: I742e4a48be6c478a62c16a32cf89852b850aff9d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
as it is not needed at all. Multisampled FBOs do not need multisampled
configs.
What's more, this fixes crashing Mesa with Intel and EGL, where creating
a pbuffer for a config with multisampling simply crashes. (and due to
other issues we disable surfaceless QOffscreenSurface for Intel so
the pbuffer cannot be avoided)
Task-number: QTBUG-47509
Change-Id: I3ae3fae8513a6dc64ca4ab11c61d4777c6c09cec
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Since d7ca800a87 the shortcut events were
only sent once. The one sent by QGuiApplication did not create a
QKeyEvent with the full native modifier state - basically the extended
key event expected everywhere.
That means that shortcuts on some keyboard layouts - like ctrl-shift-7 on
the German keyboard (resulting in ctrl+/) - would not work when the
shortcut override was tested from QGuiApplication, but then the same shortcut was
sent from QApplication with the full information, so it worked the
second time. Shortcuts of this type in Qt Quick were broken before.
Task-number: QTBUG-47062
Change-Id: I8390b9a96d0d998a2a538ac65503702e0d299cc7
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
In http://blog.qt.io/blog/2014/03/11/qt-weekly-1-categorized-logging/
the Rules section is given as:
[rules]
...
While in reality only Rules was accepted. Ignore casing instead.
Change-Id: Ibf0da6b6df857988d508ba9ec354cbce0b2c56d6
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Resolve ambiguity with function calls (due to double->float conversion),
use qreal where needed intead of explicit 'double'.
Change-Id: I28f1fb4a2b424b1399fb082a36ba9cff666f7c62
Task-number: QTBUG-47433
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
As we may have multiple versions of a QML module present in the
doc build, the logic QDoc uses for merging collection nodes from
different trees needs to be revised a bit.
After this change, the collection nodes for identically-named
QML and JS modules are merged only if the major version number
matches. This prevents the situation where QML types for both
versions are listed in QML module pages.
Change-Id: I76b056a2073744347b160b25ed5bb043279f2b8a
Task-number: QTBUG-47536
Reviewed-by: Martin Smith <martin.smith@digia.com>
To query back certain things, like the actual OpenGL version from the created context,
the eglconvenience code makes the new context current either without a surface
(in case EGL_KHR_surfaceless_context is supported) or with a pbuffer (or other
platform specific equivalent). There is no problem with the former. The latter
can however fail when samples are requested for the context and there are no
matching pbuffer configs. The result is a pbuffer without multisampling,
which could lead to a BAD_MATCH.
This is visible on GLES 2.0 devices like the Beaglebone. The solution is to fall
back to creating a new, temporary context with a config matching the pbuffer's
whenever the makeCurrent attempt fails.
Change-Id: Icd9f3383f2cad36dd5b60dead655328b7b9af658
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Checking for the exact same context is too strict. The texture is valid
in sharing contexts too.
Task-number: QTBUG-47521
Change-Id: Ifdf329ef5361b48abcb7c69e08acd7e35d624a08
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>