From fd209144f8df3ab7c6f13d8efc67d9339ccc52e7 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 20 Aug 2009 16:27:21 -0700 Subject: Force rasterfallbacks with a env variable in dfb If qgetenv("QT_DIRECTFB_FORCE_RASTER").toInt() > 0 all paint operations will fall back to the raster engine in DirectFB. Good trick for debugging. I hijacked the compositionModeStatus variable for this since it's checked for every paint operation anyway and I didn't want to introduce any overhead. Reviewed-by: Donald Carr --- src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 26a2374..956189c 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -847,6 +847,13 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m { if (!surface) return; + + static const bool forceRasterFallBack = qgetenv("QT_DIRECTFB_FORCE_RASTER").toInt() > 0; + if (forceRasterFallBack) { + compositionModeStatus = 0; + return; + } + compositionModeStatus = PorterDuff_SupportedBlits; switch (mode) { case QPainter::CompositionMode_Clear: -- cgit v0.12