aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-08-05 10:42:21 +0200
committerSergio Ahumada <sergio.ahumada@digia.com>2013-08-05 10:42:21 +0200
commit1d3b9db5b54d8ae99c6b149c8d3d91eda19b5838 (patch)
tree9ffbf9d6d2ed6b0aef6155215767c56655ff405b /src/quick/scenegraph
parent45792359f25813af18b7416e4c18737ed4b20bff (diff)
parent0316506d9ddbc3ca9f26f880b9e7fb5d5b0fec36 (diff)
Merge branch 'stable' into dev
Conflicts: .qmake.conf Change-Id: I06f79bcbde13c7b12905492a17dbcbb4a594e557
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp6
-rw-r--r--src/quick/scenegraph/qsgdefaultrectanglenode.cpp2
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode.cpp2
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp4
4 files changed, 8 insertions, 6 deletions
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
index afea96b35c..4652a2241e 100644
--- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
@@ -172,7 +172,8 @@ void QSGDefaultDistanceFieldGlyphCache::storeGlyphs(const QHash<glyph_t, QImage>
}
}
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, glyph.width(), glyph.height(), GL_ALPHA, GL_UNSIGNED_BYTE, glyph.constBits());
+ for (int i = 0; i < glyph.height(); ++i)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, glyph.width(), 1, GL_ALPHA, GL_UNSIGNED_BYTE, glyph.scanLine(i));
}
QHash<TextureInfo *, QVector<glyph_t> >::const_iterator i;
@@ -242,7 +243,8 @@ void QSGDefaultDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int
updateTexture(oldTexture, texInfo->texture, texInfo->size);
if (useWorkaround()) {
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, oldWidth, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, texInfo->image.constBits());
+ for (int i = 0; i < oldHeight; ++i)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, i, oldWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, texInfo->image.scanLine(i));
texInfo->image = texInfo->image.copy(0, 0, width, height);
glDeleteTextures(1, &oldTexture);
return;
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
index 76fbbb4209..276041d144 100644
--- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
@@ -339,7 +339,7 @@ void QSGDefaultRectangleNode::update()
m_dirty_geometry = false;
}
m_material.setFlag(QSGMaterial::Blending, (m_gradient_stops.size() > 0 && !m_gradient_is_opaque)
- || m_color.alpha() < 255
+ || (m_color.alpha() < 255 && m_color.alpha() != 0)
|| (m_pen_width > 0 && m_border_color.alpha() < 255));
}
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
index cc4aa4bada..1b10b8b894 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
@@ -213,7 +213,7 @@ void QSGDistanceFieldGlyphNode::updateGeometry()
QVector<ushort> ip;
ip.reserve(indexes.size() * 6);
- qreal maxTexMargin = m_glyph_cache->distanceFieldRadius() / 2;
+ qreal maxTexMargin = m_glyph_cache->distanceFieldRadius();
qreal fontScale = m_glyph_cache->fontScale(fontPixelSize);
qreal margin = 2;
qreal texMargin = margin / fontScale;
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index bfd9a2fb20..1e0d7c5776 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -535,12 +535,12 @@ void QSGRenderThread::sync()
}
}
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+
RLDEBUG(" Render: - unlocking after sync");
waitCondition.wakeOne();
mutex.unlock();
-
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
}