summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:30:57 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:35:24 +0100
commitad16478a76815f8f61d454bf7760aaf9ffbb4b51 (patch)
treeeefdd9219cc9d59b62e042f49fc7555b980cb7a4 /src/gui/painting
parent80a741f3616290897ba0d9f1cbd3c9c5ee62da37 (diff)
parent09c92863001790a0304a5ef389901ee2b5b6cdc2 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp2
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp18
3 files changed, 9 insertions, 13 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 8409481ad5..651149c4c6 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -4150,7 +4150,7 @@ public:
inline const QRgba64 *getBuffer(const QGradient &gradient, int opacity) {
quint64 hash_val = 0;
- QGradientStops stops = gradient.stops();
+ const QGradientStops stops = gradient.stops();
for (int i = 0; i < stops.size() && i <= 2; i++)
hash_val += stops[i].second.rgba64();
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index e80c0130c3..5dcab11f0a 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -3154,7 +3154,7 @@ void QPainter::shear(qreal sh, qreal sv)
/*!
\fn void QPainter::rotate(qreal angle)
- Rotates the coordinate system clockwise. The given \a angle parameter uses degree unit.
+ Rotates the coordinate system clockwise. The given \a angle parameter is in degrees.
\sa setWorldTransform(), {QPainter#Coordinate Transformations}{Coordinate Transformations}
*/
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index cda2446a5e..4b725fc79f 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -371,17 +371,13 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
if (textureId) {
if (d_ptr->needsSwizzle)
d_ptr->blitter->setSwizzleRB(true);
- // offset is usually (0, 0) unless we have native child widgets.
- if (offset.isNull()) {
- d_ptr->blitter->blit(textureId, QMatrix4x4(), origin);
- } else {
- // The backingstore is for the entire tlw. offset tells the position of the native child in the tlw.
- const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset), d_ptr->textureSize.height());
- const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(deviceRect(srcRect, window),
- d_ptr->textureSize,
- origin);
- d_ptr->blitter->blit(textureId, QMatrix4x4(), source);
- }
+ // The backingstore is for the entire tlw.
+ // In case of native children offset tells the position relative to the tlw.
+ const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset), d_ptr->textureSize.height());
+ const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(deviceRect(srcRect, window),
+ d_ptr->textureSize,
+ origin);
+ d_ptr->blitter->blit(textureId, QMatrix4x4(), source);
if (d_ptr->needsSwizzle)
d_ptr->blitter->setSwizzleRB(false);
}