diff options
author | Anders Bakken <anders@trolltech.com> | 2009-03-20 15:02:13 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-03-25 15:57:17 (GMT) |
commit | 4c1bc57ac5e03a5189716a2ad32d94bb5f71a360 (patch) | |
tree | 06d42a1e46b8aa25590ca59fe9450565706b2b2e /src/plugins/gfxdrivers/directfb | |
parent | 2474f079d2937c047e9265ed626c120eb32a520f (diff) | |
download | Qt-4c1bc57ac5e03a5189716a2ad32d94bb5f71a360.zip Qt-4c1bc57ac5e03a5189716a2ad32d94bb5f71a360.tar.gz Qt-4c1bc57ac5e03a5189716a2ad32d94bb5f71a360.tar.bz2 |
Get rid of the setImageColorTable stuff.
It's never necessary. Any surface we ever intend to lock and write to
should never have a color table.
Reviewed-by: Tom Cooksey
Diffstat (limited to 'src/plugins/gfxdrivers/directfb')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 44 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.h | 1 |
2 files changed, 0 insertions, 45 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 0486e40..26c023f 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -362,50 +362,6 @@ void QDirectFBScreen::setSurfaceColorTable(IDirectFBSurface *surface, palette->Release(palette); } -void QDirectFBScreen::setImageColorTable(QImage *image, IDirectFBSurface *surface) -{ - if (!image || !surface || image->depth() > 8) - return; - - IDirectFBPalette *palette = 0; - unsigned int numColors = 0; - DFBResult result; - do { - result = surface->GetPalette(surface, &palette); - if (result != DFB_OK) { - DirectFBError("QDirectFBScreen::setImageColorTable GetPalette", result); - break; - } - - result = palette->GetSize(palette, &numColors); - if (result != DFB_OK) { - DirectFBError("QDirectFBScreen::setImageColorTable GetPalette", result); - break; - } - - if (numColors == 0) - break; - - QVarLengthArray<DFBColor> dfbColors(numColors); - result = palette->GetEntries(palette, dfbColors.data(), numColors, 0); - if (result != DFB_OK) { - DirectFBError("QDirectFBScreen::setImageColorTable GetPalette", result); - break; - } - - QVector<QRgb> qtColors(numColors); - for (unsigned int i=0; i<numColors; ++i) { - const DFBColor &col = dfbColors[i]; - qtColors[i] = qRgba(col.r, col.g, col.b, col.a); - } - image->setColorTable(qtColors); - - } while (0); - - if (palette) - palette->Release(palette); -} - #endif // QT_NO_DIRECTFB_PALETTE #if !defined(QT_NO_DIRECTFB_LAYER) && !defined(QT_NO_QWS_CURSOR) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index e9a2f63..35dea0d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -104,7 +104,6 @@ public: #ifndef QT_NO_DIRECTFB_PALETTE static void setSurfaceColorTable(IDirectFBSurface *surface, const QImage &image); - static void setImageColorTable(QImage *image, IDirectFBSurface *surface); #endif private: |