summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-04-22 16:46:29 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-04-22 17:04:27 (GMT)
commitcb14e8b90c71afb851c3165fc009e4fa11dd04c9 (patch)
tree224be134df2a84ddc36439e17988adc8a4017b11 /src
parentcf9db492ac60568bd159c3749dfa11e2347b9927 (diff)
downloadQt-cb14e8b90c71afb851c3165fc009e4fa11dd04c9.zip
Qt-cb14e8b90c71afb851c3165fc009e4fa11dd04c9.tar.gz
Qt-cb14e8b90c71afb851c3165fc009e4fa11dd04c9.tar.bz2
Take out STATIC_ALLOC of primary surface creation
We never resize this surface anyway so it's not necessary. Make it possible to enable with an option. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 041d522..65c027d 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -833,15 +833,15 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
description.flags = DFBSurfaceDescriptionFlags(description.flags | DSDESC_WIDTH);
if (::setIntOption(displayArgs, QLatin1String("height"), &description.height))
description.flags = DFBSurfaceDescriptionFlags(description.flags | DSDESC_HEIGHT);
- description.caps = DFBSurfaceCapabilities(DSCAPS_PRIMARY
- | DSCAPS_DOUBLE
- | DSCAPS_STATIC_ALLOC);
- if (displayArgs.contains(QLatin1String("forcepremultiplied"),
- Qt::CaseInsensitive)) {
- description.caps = DFBSurfaceCapabilities(description.caps
- | DSCAPS_PREMULTIPLIED);
+ uint caps = DSCAPS_PRIMARY|DSCAPS_DOUBLE;
+ if (displayArgs.contains(QLatin1String("static_alloc")))
+ caps |= DSCAPS_STATIC_ALLOC;
+
+ if (displayArgs.contains(QLatin1String("forcepremultiplied"), Qt::CaseInsensitive)) {
+ caps |= DSCAPS_PREMULTIPLIED;
}
+ description.caps = DFBSurfaceCapabilities(caps);
// We don't track the primary surface as it's released in disconnect
d_ptr->dfbSurface = createDFBSurface(&description, DontTrackSurface);
if (!d_ptr->dfbSurface) {