diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-08 14:56:27 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-08 14:56:27 (GMT) |
commit | e5b6414f5b28a93c917380fb57f56d0ca46f2961 (patch) | |
tree | ecaed6ae09be0d141244d32156df7a5fbc9b2414 /src/plugins | |
parent | 6b46ec56d15516bfae72561c872fa6835527c4f8 (diff) | |
parent | b850c43896d60b4dda21b01fdbdb15013cca48fa (diff) | |
download | Qt-e5b6414f5b28a93c917380fb57f56d0ca46f2961.zip Qt-e5b6414f5b28a93c917380fb57f56d0ca46f2961.tar.gz Qt-e5b6414f5b28a93c917380fb57f56d0ca46f2961.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Check Qt::WA_TranslucentBackground instead of custom widget property.
New translucency API for the meego graphics system.
Support for 'qglTranslucent' in QGLWindowSurface.
Use a different dither distribution matrix + a bit of rand.
Fixed cubic bezier rendering bug in qgrayraster.
Revert "qgrayraster: Speed up rendering of small cubic splines."
Fix QWingedEdge memory usage issue
Make sure QMeeGoGraphicsSystem::setTranslucent can't be called if surface already created.
Prevent always deep-copying in QPixmap::toImage() for raster pixmaps.
Fix text disappearing on GL when RGB-path is taken (no transformation)
Fix for GCC on Windows x64.
Fix crash in QTextDocument::markContentsDirty
Make sure to do a deep copy of a QImage when it's being painted on.
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/graphicssystems/meego/dithering.cpp | 11 | ||||
-rw-r--r-- | src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 9 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/plugins/graphicssystems/meego/dithering.cpp b/src/plugins/graphicssystems/meego/dithering.cpp index 1a2e3fa..ca303a8 100644 --- a/src/plugins/graphicssystems/meego/dithering.cpp +++ b/src/plugins/graphicssystems/meego/dithering.cpp @@ -154,7 +154,10 @@ unsigned short* convertRGB32_to_RGB565(const unsigned char *in, int width, int h // Add the diffusion for this pixel we stored in the accumulator. // >> 7 because the values in accumulator are stored * 128 - component[c] += accumulator[c][x] >> 7; + if (x != 0 && x != (width - 1)) { + if (accumulator[c][x] >> 7 != 0) + component[c] += rand() % accumulator[c][x] >> 7; + } // Make sure we're not over the boundaries. CLAMP_256(component[c]); @@ -172,10 +175,10 @@ unsigned short* convertRGB32_to_RGB565(const unsigned char *in, int width, int h // Distribute the difference according to the matrix in the // accumulation bufffer. - ACCUMULATE(accumulator[c], x + 1, 0, width, diff * 7); - ACCUMULATE(accumulator[c], x - 1, 1, width, diff * 3); + ACCUMULATE(accumulator[c], x + 1, 0, width, diff * 3); + ACCUMULATE(accumulator[c], x - 1, 1, width, diff * 5); ACCUMULATE(accumulator[c], x, 1, width, diff * 5); - ACCUMULATE(accumulator[c], x + 1, 1, width, diff * 1); + ACCUMULATE(accumulator[c], x + 1, 1, width, diff * 3); } // Write the newly produced pixel diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 507f70b..4a86082 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -124,8 +124,10 @@ QPixmapData* QMeeGoGraphicsSystem::wrapPixmapData(QPixmapData *pmd) void QMeeGoGraphicsSystem::setSurfaceFixedSize(int /*width*/, int /*height*/) { - if (QMeeGoGraphicsSystem::surfaceWasCreated) + if (QMeeGoGraphicsSystem::surfaceWasCreated) { qWarning("Trying to set surface fixed size but surface already created!"); + return; + } #ifdef QT_WAS_PATCHED QEglProperties *properties = new QEglProperties(); @@ -143,6 +145,11 @@ void QMeeGoGraphicsSystem::setSurfaceScaling(int x, int y, int width, int height void QMeeGoGraphicsSystem::setTranslucent(bool translucent) { + if (QMeeGoGraphicsSystem::surfaceWasCreated) { + qWarning("Trying to set translucency but surface already created!"); + return; + } + QGLWindowSurface::surfaceFormat.setSampleBuffers(false); QGLWindowSurface::surfaceFormat.setSamples(0); QGLWindowSurface::surfaceFormat.setAlpha(translucent); |