summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/angle/src/libANGLE/Context.cpp3
-rw-r--r--src/3rdparty/angle/src/libANGLE/Stream.cpp8
-rw-r--r--src/3rdparty/angle/src/libANGLE/Texture.cpp3
-rw-r--r--src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp3
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java13
-rw-r--r--src/android/templates/AndroidManifest.xml6
-rw-r--r--src/angle/patches/0013-Fix-compilation-with-icc-converting-between-egl-s-an.patch93
-rw-r--r--src/gui/image/qiconloader.cpp5
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp2
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp4
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp10
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp14
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h5
13 files changed, 56 insertions, 113 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/Context.cpp b/src/3rdparty/angle/src/libANGLE/Context.cpp
index 84f7936feb..f638beda58 100644
--- a/src/3rdparty/angle/src/libANGLE/Context.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Context.cpp
@@ -451,8 +451,7 @@ egl::Error Context::onDestroy(const egl::Display *display)
for (auto &zeroTexture : mZeroTextures)
{
- auto result = zeroTexture.second->onDestroy(this);
- ANGLE_TRY(egl::Error(result));
+ ANGLE_TRY(zeroTexture.second->onDestroy(this));
zeroTexture.second.set(this, nullptr);
}
mZeroTextures.clear();
diff --git a/src/3rdparty/angle/src/libANGLE/Stream.cpp b/src/3rdparty/angle/src/libANGLE/Stream.cpp
index e384c7d486..68279976b7 100644
--- a/src/3rdparty/angle/src/libANGLE/Stream.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Stream.cpp
@@ -192,9 +192,8 @@ Error Stream::consumerAcquire(const gl::Context *context)
{
if (mPlanes[i].texture != nullptr)
{
- auto result = mPlanes[i].texture->acquireImageFromStream(
- context, mProducerImplementation->getGLFrameDescription(i));
- ANGLE_TRY(Error(result));
+ ANGLE_TRY(mPlanes[i].texture->acquireImageFromStream(
+ context, mProducerImplementation->getGLFrameDescription(i)));
}
}
@@ -214,8 +213,7 @@ Error Stream::consumerRelease(const gl::Context *context)
{
if (mPlanes[i].texture != nullptr)
{
- auto result = mPlanes[i].texture->releaseImageFromStream(context);
- ANGLE_TRY(Error(result));
+ ANGLE_TRY(mPlanes[i].texture->releaseImageFromStream(context));
}
}
diff --git a/src/3rdparty/angle/src/libANGLE/Texture.cpp b/src/3rdparty/angle/src/libANGLE/Texture.cpp
index 7447604fe6..da92e65916 100644
--- a/src/3rdparty/angle/src/libANGLE/Texture.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Texture.cpp
@@ -550,8 +550,7 @@ Error Texture::onDestroy(const Context *context)
{
if (mBoundSurface)
{
- auto result = mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER);
- ANGLE_TRY(Error(result));
+ ANGLE_TRY(mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER));
mBoundSurface = nullptr;
}
if (mBoundStream)
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
index b583273641..75c6298868 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
@@ -376,8 +376,7 @@ egl::Error Renderer9::initializeDevice()
ASSERT(!mBlit);
mBlit = new Blit9(this);
- auto result = mBlit->initialize();
- ANGLE_TRY(egl::Error(result));
+ ANGLE_TRY(mBlit->initialize());
ASSERT(!mVertexDataManager && !mIndexDataManager);
mVertexDataManager = new VertexDataManager(this);
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index 1cbb8fe117..8fa889fa31 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -765,11 +765,19 @@ public class QtActivityDelegate
}
m_layout = new QtLayout(m_activity, startApplication);
+ int orientation = m_activity.getResources().getConfiguration().orientation;
+
try {
ActivityInfo info = m_activity.getPackageManager().getActivityInfo(m_activity.getComponentName(), PackageManager.GET_META_DATA);
- if (info.metaData.containsKey("android.app.splash_screen_drawable")) {
+
+ String splashScreenKey = "android.app.splash_screen_drawable_"
+ + (orientation == Configuration.ORIENTATION_LANDSCAPE ? "landscape" : "portrait");
+ if (!info.metaData.containsKey(splashScreenKey))
+ splashScreenKey = "android.app.splash_screen_drawable";
+
+ if (info.metaData.containsKey(splashScreenKey)) {
m_splashScreenSticky = info.metaData.containsKey("android.app.splash_screen_sticky") && info.metaData.getBoolean("android.app.splash_screen_sticky");
- int id = info.metaData.getInt("android.app.splash_screen_drawable");
+ int id = info.metaData.getInt(splashScreenKey);
m_splashScreen = new ImageView(m_activity);
m_splashScreen.setImageDrawable(m_activity.getResources().getDrawable(id));
m_splashScreen.setScaleType(ImageView.ScaleType.FIT_XY);
@@ -789,7 +797,6 @@ public class QtActivityDelegate
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
- int orientation = m_activity.getResources().getConfiguration().orientation;
int rotation = m_activity.getWindowManager().getDefaultDisplay().getRotation();
boolean rot90 = (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270);
boolean currentlyLandscape = (orientation == Configuration.ORIENTATION_LANDSCAPE);
diff --git a/src/android/templates/AndroidManifest.xml b/src/android/templates/AndroidManifest.xml
index f4b99e0895..aed8a3c888 100644
--- a/src/android/templates/AndroidManifest.xml
+++ b/src/android/templates/AndroidManifest.xml
@@ -52,6 +52,12 @@
<!-- Messages maps -->
<!-- Splash screen -->
+ <!-- Orientation-specific (portrait/landscape) data is checked first. If not available for current orientation,
+ then android.app.splash_screen_drawable. For best results, use together with splash_screen_sticky and
+ use hideSplashScreen() with a fade-out animation from Qt Android Extras to hide the splash screen when you
+ are done populating your window with content. -->
+ <!-- meta-data android:name="android.app.splash_screen_drawable_portrait" android:resource="@drawable/logo_portrait" / -->
+ <!-- meta-data android:name="android.app.splash_screen_drawable_landscape" android:resource="@drawable/logo_landscape" / -->
<!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
<!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
<!-- Splash screen -->
diff --git a/src/angle/patches/0013-Fix-compilation-with-icc-converting-between-egl-s-an.patch b/src/angle/patches/0013-Fix-compilation-with-icc-converting-between-egl-s-an.patch
deleted file mode 100644
index 6d3b1cac08..0000000000
--- a/src/angle/patches/0013-Fix-compilation-with-icc-converting-between-egl-s-an.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 2d8118620d4871f74a3ddca233529ff540384477 Mon Sep 17 00:00:00 2001
-From: Yuhang Zhao <2546789017@qq.com>
-Date: Wed, 13 Feb 2019 23:26:55 +0800
-Subject: [PATCH] Fix compilation with icc, converting between egl's and gl's
- Error types
-
-Each has two constructors from the other, one copying the other
-moving; and this leads to an ambiguous overload when converting
-Texture::onDestroy()'s gl::error to the egl::Error that
-gl::Context::onDestroy() returns. Passing the value through a
-temporary prevents the move-constructor from being attempted and saves
-the day. Thanks to Ville Voutilainen for suggesting the fix.
-
-Fixes: QTBUG-73698
-Change-Id: I628173399a73cee2e253201bc3e8d3e6477a2fbf
----
- src/3rdparty/angle/src/libANGLE/Context.cpp | 3 ++-
- src/3rdparty/angle/src/libANGLE/Stream.cpp | 8 +++++---
- src/3rdparty/angle/src/libANGLE/Texture.cpp | 3 ++-
- .../angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp | 3 ++-
- 4 files changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/src/3rdparty/angle/src/libANGLE/Context.cpp b/src/3rdparty/angle/src/libANGLE/Context.cpp
-index f638beda58..84f7936feb 100644
---- a/src/3rdparty/angle/src/libANGLE/Context.cpp
-+++ b/src/3rdparty/angle/src/libANGLE/Context.cpp
-@@ -451,7 +451,8 @@ egl::Error Context::onDestroy(const egl::Display *display)
-
- for (auto &zeroTexture : mZeroTextures)
- {
-- ANGLE_TRY(zeroTexture.second->onDestroy(this));
-+ auto result = zeroTexture.second->onDestroy(this);
-+ ANGLE_TRY(egl::Error(result));
- zeroTexture.second.set(this, nullptr);
- }
- mZeroTextures.clear();
-diff --git a/src/3rdparty/angle/src/libANGLE/Stream.cpp b/src/3rdparty/angle/src/libANGLE/Stream.cpp
-index 68279976b7..e384c7d486 100644
---- a/src/3rdparty/angle/src/libANGLE/Stream.cpp
-+++ b/src/3rdparty/angle/src/libANGLE/Stream.cpp
-@@ -192,8 +192,9 @@ Error Stream::consumerAcquire(const gl::Context *context)
- {
- if (mPlanes[i].texture != nullptr)
- {
-- ANGLE_TRY(mPlanes[i].texture->acquireImageFromStream(
-- context, mProducerImplementation->getGLFrameDescription(i)));
-+ auto result = mPlanes[i].texture->acquireImageFromStream(
-+ context, mProducerImplementation->getGLFrameDescription(i));
-+ ANGLE_TRY(Error(result));
- }
- }
-
-@@ -213,7 +214,8 @@ Error Stream::consumerRelease(const gl::Context *context)
- {
- if (mPlanes[i].texture != nullptr)
- {
-- ANGLE_TRY(mPlanes[i].texture->releaseImageFromStream(context));
-+ auto result = mPlanes[i].texture->releaseImageFromStream(context);
-+ ANGLE_TRY(Error(result));
- }
- }
-
-diff --git a/src/3rdparty/angle/src/libANGLE/Texture.cpp b/src/3rdparty/angle/src/libANGLE/Texture.cpp
-index da92e65916..7447604fe6 100644
---- a/src/3rdparty/angle/src/libANGLE/Texture.cpp
-+++ b/src/3rdparty/angle/src/libANGLE/Texture.cpp
-@@ -550,7 +550,8 @@ Error Texture::onDestroy(const Context *context)
- {
- if (mBoundSurface)
- {
-- ANGLE_TRY(mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER));
-+ auto result = mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER);
-+ ANGLE_TRY(Error(result));
- mBoundSurface = nullptr;
- }
- if (mBoundStream)
-diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
-index 75c6298868..b583273641 100644
---- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
-+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
-@@ -376,7 +376,8 @@ egl::Error Renderer9::initializeDevice()
-
- ASSERT(!mBlit);
- mBlit = new Blit9(this);
-- ANGLE_TRY(mBlit->initialize());
-+ auto result = mBlit->initialize();
-+ ANGLE_TRY(egl::Error(result));
-
- ASSERT(!mVertexDataManager && !mIndexDataManager);
- mVertexDataManager = new VertexDataManager(this);
---
-2.20.1.windows.1
-
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index a9adde8c8d..1d0c93f26f 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -629,7 +629,10 @@ void QIconLoaderEngine::ensureLoaded()
void QIconLoaderEngine::paint(QPainter *painter, const QRect &rect,
QIcon::Mode mode, QIcon::State state)
{
- QSize pixmapSize = rect.size();
+ const qreal dpr = !qApp->testAttribute(Qt::AA_UseHighDpiPixmaps) ?
+ qreal(1.0) : painter->device()->devicePixelRatioF();
+
+ QSize pixmapSize = rect.size() * dpr;
painter->drawPixmap(rect, pixmap(pixmapSize, mode, state));
}
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index aa8f9a892a..e545d54ec2 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -908,7 +908,7 @@ QFont QFontconfigDatabase::defaultFont() const
void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef &fontDef) const
{
bool antialias = !(fontDef.styleStrategy & QFont::NoAntialias);
- bool forcedAntialiasSetting = !antialias;
+ bool forcedAntialiasSetting = !antialias || QHighDpiScaling::isActive();
const QPlatformServices *services = QGuiApplicationPrivate::platformIntegration()->services();
bool useXftConf = false;
diff --git a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp
index ed482e5dae..bbc156fc53 100644
--- a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp
@@ -192,6 +192,10 @@ bool QXcbNativeBackingStore::scroll(const QRegion &area, int dx, int dy)
void QXcbNativeBackingStore::beginPaint(const QRegion &region)
{
+ QX11PlatformPixmap *x11pm = qt_x11Pixmap(m_pixmap);
+ if (x11pm)
+ x11pm->setIsBackingStore(true);
+
#if QT_CONFIG(xrender)
if (m_translucentBackground) {
const QVector<XRectangle> xrects = qt_region_to_xrectangles(region);
diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
index 2688d6e884..3377eeaae9 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
@@ -200,6 +200,7 @@ public:
uint has_pattern : 1;
uint has_alpha_pen : 1;
uint has_alpha_brush : 1;
+ uint use_sysclip : 1;
uint render_hints;
const QXcbX11Info *xinfo;
@@ -701,6 +702,9 @@ bool QX11PaintEngine::begin(QPaintDevice *pdev)
d->xlibMaxLinePoints = 32762; // a safe number used to avoid, call to XMaxRequestSize(d->dpy) - 3;
d->opacity = 1;
+ QX11PlatformPixmap *x11pm = paintDevice()->devType() == QInternal::Pixmap ? qt_x11Pixmap(*static_cast<QPixmap *>(paintDevice())) : nullptr;
+ d->use_sysclip = paintDevice()->devType() == QInternal::Widget || (x11pm ? x11pm->isBackingStore() : false);
+
// Set up the polygon clipper. Note: This will only work in
// polyline mode as long as we have a buffer zone, since a
// polyline may be clipped into several non-connected polylines.
@@ -1472,7 +1476,7 @@ void QX11PaintEngine::updatePen(const QPen &pen)
}
if (!d->has_clipping) { // if clipping is set the paintevent clip region is merged with the clip region
- QRegion sysClip = systemClip();
+ QRegion sysClip = d->use_sysclip ? systemClip() : QRegion();
if (!sysClip.isEmpty())
x11SetClipRegion(d->dpy, d->gc, 0, d->picture, sysClip);
else
@@ -1603,7 +1607,7 @@ void QX11PaintEngine::updateBrush(const QBrush &brush, const QPointF &origin)
vals.fill_style = s;
XChangeGC(d->dpy, d->gc_brush, mask, &vals);
if (!d->has_clipping) {
- QRegion sysClip = systemClip();
+ QRegion sysClip = d->use_sysclip ? systemClip() : QRegion();
if (!sysClip.isEmpty())
x11SetClipRegion(d->dpy, d->gc_brush, 0, d->picture, sysClip);
else
@@ -2223,7 +2227,7 @@ void QX11PaintEngine::updateMatrix(const QTransform &mtx)
void QX11PaintEngine::updateClipRegion_dev(const QRegion &clipRegion, Qt::ClipOperation op)
{
Q_D(QX11PaintEngine);
- QRegion sysClip = systemClip();
+ QRegion sysClip = d->use_sysclip ? systemClip() : QRegion();
if (op == Qt::NoClip) {
d->has_clipping = false;
d->crgn = sysClip;
diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
index 86c87e5e30..b1ce39f363 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
@@ -1772,6 +1772,20 @@ XID QX11PlatformPixmap::createBitmapFromImage(const QImage &image)
return hd;
}
+bool QX11PlatformPixmap::isBackingStore() const
+{
+ return (flags & IsBackingStore);
+}
+
+void QX11PlatformPixmap::setIsBackingStore(bool on)
+{
+ if (on)
+ flags |= IsBackingStore;
+ else {
+ flags &= ~IsBackingStore;
+ }
+}
+
#if QT_CONFIG(xrender)
void QX11PlatformPixmap::convertToARGB32(bool preserveContents)
{
diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h
index 7392cbfccf..9c0ba98300 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h
@@ -90,6 +90,8 @@ public:
void convertToARGB32(bool preserveContents = true);
#endif
+ bool isBackingStore() const;
+ void setIsBackingStore(bool on);
private:
friend class QX11PaintEngine;
friend const QXcbX11Info &qt_x11Info(const QPixmap &pixmap);
@@ -110,7 +112,8 @@ private:
Uninitialized = 0x1,
Readonly = 0x2,
InvertedWhenBoundToTexture = 0x4,
- GlSurfaceCreatedWithAlpha = 0x8
+ GlSurfaceCreatedWithAlpha = 0x8,
+ IsBackingStore = 0x10
};
uint flags;