summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:25:08 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:25:08 (GMT)
commit1d05c5221ba8ad3f5d3d36ba2025ea45bc3afe88 (patch)
tree6cba08738ce9fcdb0d1d8d7417b336a8521f36a1 /src/plugins/gfxdrivers
parentb7923d48fb6d755d4563eeed0e7f3cbc774d69d5 (diff)
parent0db5ca5c733422b28524791b4f292227a61090d2 (diff)
downloadQt-1d05c5221ba8ad3f5d3d36ba2025ea45bc3afe88.zip
Qt-1d05c5221ba8ad3f5d3d36ba2025ea45bc3afe88.tar.gz
Qt-1d05c5221ba8ad3f5d3d36ba2025ea45bc3afe88.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts: tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp51
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h4
2 files changed, 5 insertions, 50 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index b5c4cc5..ce9a55c 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -250,19 +250,6 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
return false;
}
- QDirectFBPointer<IDirectFBSurface> surfaceFromDescription;
- surfaceFromDescription.reset(screen->createDFBSurface(surfaceDescription, QDirectFBScreen::DontTrackSurface, &result));
- if (!surfaceFromDescription) {
- DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't create surface", result);
- return false;
- }
-
- result = provider->RenderTo(provider.data(), surfaceFromDescription.data(), 0);
- if (result != DFB_OK) {
- DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't render to surface", result);
- return false;
- }
-
DFBImageDescription imageDescription;
result = provider->GetImageDescription(provider.data(), &imageDescription);
if (result != DFB_OK) {
@@ -275,51 +262,19 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
dfbSurface = screen->createDFBSurface(QSize(surfaceDescription.width, surfaceDescription.height),
imageFormat, QDirectFBScreen::TrackSurface);
- if (alpha)
- dfbSurface->Clear(dfbSurface, 0, 0, 0, 0);
-
- DFBSurfaceBlittingFlags blittingFlags = DSBLIT_NOFX;
- if (imageDescription.caps & DICAPS_COLORKEY) {
- blittingFlags |= DSBLIT_SRC_COLORKEY;
- result = surfaceFromDescription->SetSrcColorKey(surfaceFromDescription.data(),
- imageDescription.colorkey_r,
- imageDescription.colorkey_g,
- imageDescription.colorkey_b);
- if (result != DFB_OK) {
- DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't set src color key", result);
- invalidate(); // release dfbSurface
- return false;
- }
- }
- if (imageDescription.caps & DICAPS_ALPHACHANNEL) {
- blittingFlags |= DSBLIT_BLEND_ALPHACHANNEL;
- }
- result = dfbSurface->SetBlittingFlags(dfbSurface, blittingFlags);
- if (result != DFB_OK) {
- DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't set blitting flags", result);
- invalidate(); // release dfbSurface
- return false;
- }
- result = dfbSurface->Blit(dfbSurface, surfaceFromDescription.data(), 0, 0, 0);
+ result = provider->RenderTo(provider.data(), dfbSurface, 0);
if (result != DFB_OK) {
- DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't blit to surface", result);
- invalidate(); // release dfbSurface
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't render to surface", result);
return false;
}
- if (blittingFlags != DSBLIT_NOFX) {
- dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
- }
-
w = surfaceDescription.width;
h = surfaceDescription.height;
is_null = (w <= 0 || h <= 0);
d = QDirectFBScreen::depth(imageFormat);
setSerialNumber(++global_ser_no);
-#if (Q_DIRECTFB_VERSION >= 0x010000)
- dfbSurface->ReleaseSource(dfbSurface);
-#endif
+
#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
screen->setDirectFBImageProvider(providerPtr);
provider.take();
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index febb2b2..5e8c5c6 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -75,8 +75,8 @@ QT_MODULE(Gui)
#if !defined QT_DIRECTFB_WINDOW_AS_CURSOR && !defined QT_NO_DIRECTFB_WINDOW_AS_CURSOR
#define QT_NO_DIRECTFB_WINDOW_AS_CURSOR
#endif
-#if !defined QT_NO_DIRECTFB_PALETTE && !defined QT_DIRECTFB_PALETTE
-#define QT_DIRECTFB_PALETTE
+#if !defined QT_DIRECTFB_PALETTE && !defined QT_NO_DIRECTFB_PALETTE
+#define QT_NO_DIRECTFB_PALETTE
#endif
#if !defined QT_NO_DIRECTFB_PREALLOCATED && !defined QT_DIRECTFB_PREALLOCATED
#define QT_DIRECTFB_PREALLOCATED