summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-15 02:34:37 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-15 02:34:37 (GMT)
commit567bcd38dd7a749ac0bc3cdd2432798ab1af74fe (patch)
tree56012241e5268c1dc983d43f50957e911534c3c9 /src
parent3b274b5d285ca2da0414ce5b2c16e87c7baac43e (diff)
parent67b24ac50637ecda00990b239fc5ed0b73e54d75 (diff)
downloadQt-567bcd38dd7a749ac0bc3cdd2432798ab1af74fe.zip
Qt-567bcd38dd7a749ac0bc3cdd2432798ab1af74fe.tar.gz
Qt-567bcd38dd7a749ac0bc3cdd2432798ab1af74fe.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed stroke / fill inconsistencies in GL 2 paint engine.
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp40
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
2 files changed, 0 insertions, 42 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index bb7c804..cdd785a 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -381,12 +381,6 @@ void QGL2PaintEngineExPrivate::updateMatrix()
dx = ceilf(dx - 0.5f);
dy = ceilf(dy - 0.5f);
}
-#ifndef Q_OS_SYMBIAN
- if (addOffset) {
- dx += 0.49f;
- dy += 0.49f;
- }
-#endif
pmvMatrix[0][0] = (wfactor * transform.m11()) - transform.m13();
pmvMatrix[1][0] = (wfactor * transform.m21()) - transform.m23();
pmvMatrix[2][0] = (wfactor * dx) - transform.m33();
@@ -488,11 +482,6 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s
currentBrush = noBrush;
shaderManager->setSrcPixelType(pattern ? QGLEngineShaderManager::PatternSrc : QGLEngineShaderManager::ImageSrc);
- if (addOffset) {
- addOffset = false;
- matrixDirty = true;
- }
-
if (snapToPixelGrid) {
snapToPixelGrid = false;
matrixDirty = true;
@@ -675,16 +664,6 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
{
transferMode(BrushDrawingMode);
- const QOpenGL2PaintEngineState *s = q->state();
- const bool newAddOffset = !(s->renderHints & QPainter::Antialiasing) &&
- (qbrush_style(currentBrush) == Qt::SolidPattern) &&
- !multisamplingAlwaysEnabled;
-
- if (addOffset != newAddOffset) {
- addOffset = newAddOffset;
- matrixDirty = true;
- }
-
if (snapToPixelGrid) {
snapToPixelGrid = false;
matrixDirty = true;
@@ -1203,12 +1182,6 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
void QGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &pen)
{
const QOpenGL2PaintEngineState *s = q->state();
- const bool newAddOffset = !(s->renderHints & QPainter::Antialiasing) && !multisamplingAlwaysEnabled;
- if (addOffset != newAddOffset) {
- addOffset = newAddOffset;
- matrixDirty = true;
- }
-
if (snapToPixelGrid) {
snapToPixelGrid = false;
matrixDirty = true;
@@ -1638,10 +1611,6 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, (GLfloat*)vertexCoordinates->data());
setVertexAttributePointer(QT_TEXTURE_COORDS_ATTR, (GLfloat*)textureCoordinates->data());
- if (addOffset) {
- addOffset = false;
- matrixDirty = true;
- }
if (!snapToPixelGrid) {
snapToPixelGrid = true;
matrixDirty = true;
@@ -1786,11 +1755,6 @@ void QGL2PaintEngineExPrivate::drawPixmapFragments(const QPainter::PixmapFragmen
textureCoordinateArray.clear();
opacityArray.reset();
- if (addOffset) {
- addOffset = false;
- matrixDirty = true;
- }
-
if (snapToPixelGrid) {
snapToPixelGrid = false;
matrixDirty = true;
@@ -2087,10 +2051,6 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value)
{
transferMode(BrushDrawingMode);
- if (addOffset) {
- addOffset = false;
- matrixDirty = true;
- }
if (snapToPixelGrid) {
snapToPixelGrid = false;
matrixDirty = true;
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index b255e75..88172fb 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -181,7 +181,6 @@ public:
elementIndicesVBOId(0),
opacityArray(0),
snapToPixelGrid(false),
- addOffset(false),
nativePaintingActive(false),
inverseScale(1),
lastMaskTextureUsed(0)
@@ -283,7 +282,6 @@ public:
GLfloat staticTextureCoordinateArray[8];
bool snapToPixelGrid;
- bool addOffset; // When enabled, adds a 0.49,0.49 offset to matrix in updateMatrix
bool nativePaintingActive;
GLfloat pmvMatrix[3][3];
GLfloat inverseScale;