summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-12 13:05:02 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-12 13:05:02 +0200
commitca524e5b70ccfeb6386cf0c5df83ffb86a8771fe (patch)
tree245c471373516ccda2b0c91943a42cd74674f2da /src/gui
parentb08cc0ec6f096d0e6764486c81264c24a406bee1 (diff)
parentc2badc7423b63824902d1f44a4b804de3335c20b (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4
Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp4
-rw-r--r--src/gui/kernel/qopenglcontext_p.h1
-rw-r--r--src/gui/opengl/qopenglversionfunctions.cpp6
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp4
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp10
-rw-r--r--src/gui/text/qplatformfontdatabase.h1
6 files changed, 22 insertions, 4 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 71a1d1e074..6b2bb092b1 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -639,6 +639,7 @@ bool QOpenGLContext::create()
*/
void QOpenGLContext::destroy()
{
+ deleteQGLContext();
Q_D(QOpenGLContext);
if (d->platformGLContext)
emit aboutToBeDestroyed();
@@ -1086,6 +1087,9 @@ void *QOpenGLContext::qGLContextHandle() const
}
/*!
+ internal: If the delete function is specified QOpenGLContext "owns"
+ the passed context handle and will use the delete function to destroy it.
+
\internal
*/
void QOpenGLContext::setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *))
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 46e1572376..2d27b19ebe 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -198,6 +198,7 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
public:
QOpenGLContextPrivate()
: qGLContextHandle(0)
+ , qGLContextDeleteFunction(0)
, platformGLContext(0)
, shareContext(0)
, shareGroup(0)
diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp
index 3335a88cbb..f5ce8865a8 100644
--- a/src/gui/opengl/qopenglversionfunctions.cpp
+++ b/src/gui/opengl/qopenglversionfunctions.cpp
@@ -98,8 +98,10 @@ void QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(QOpenGLContext *con
Qt now provides a family of classes which all inherit from
QAbstractOpenGLFunctions which expose every core OpenGL function by way of a
corresponding member function. There is a class for every valid combination
- of OpenGL version and profile. Each class follows the naming convention
- QOpenGLFunctions_<MAJOR VERSION>_<MINOR VERSION>[_PROFILE].
+ of OpenGL version and profile. Each class follows the naming convention:
+ \badcode
+ QOpenGLFunctions_<MAJOR VERSION>_<MINOR VERSION>[_PROFILE]
+ \endcode
For OpenGL versions 1.0 through to 3.0 there are no profiles, leading to the
classes:
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 2e340219b9..914691375a 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -921,7 +921,7 @@ void QRasterPaintEngine::renderHintsChanged()
bool was_aa = s->flags.antialiased;
bool was_bilinear = s->flags.bilinear;
- s->flags.antialiased = bool(s->renderHints & QPainter::Antialiasing);
+ s->flags.antialiased = bool(s->renderHints & (QPainter::Antialiasing | QPainter::HighQualityAntialiasing));
s->flags.bilinear = bool(s->renderHints & QPainter::SmoothPixmapTransform);
s->flags.legacy_rounding = !bool(s->renderHints & QPainter::Antialiasing) && bool(s->renderHints & QPainter::Qt4CompatiblePainting);
@@ -2726,7 +2726,7 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
scanline += bpl;
}
} else { // 32-bit alpha...
- uint *sl = (uint *) src;
+ uint *sl = (uint *) scanline;
for (int y = y0; y < y1; ++y) {
for (int x = x0; x < x1; ) {
// Skip those with 0 coverage
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index e9ffa68591..5dc81d241d 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -402,6 +402,16 @@ QString QPlatformFontDatabase::fontDir() const
}
/*!
+ Returns true if the font family is private. For any given family name,
+ the result is platform dependent.
+*/
+bool QPlatformFontDatabase::isPrivateFontFamily(const QString &family) const
+{
+ Q_UNUSED(family);
+ return false;
+}
+
+/*!
Returns the default system font.
\sa QGuiApplication::font()
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h
index b200cf0e58..46ef5c0f46 100644
--- a/src/gui/text/qplatformfontdatabase.h
+++ b/src/gui/text/qplatformfontdatabase.h
@@ -110,6 +110,7 @@ public:
virtual QString fontDir() const;
virtual QFont defaultFont() const;
+ virtual bool isPrivateFontFamily(const QString &family) const;
virtual QString resolveFontFamilyAlias(const QString &family) const;
virtual bool fontsAlwaysScalable() const;