From 8f445e139a5ff9ed178dc123cb3dfc4200224c43 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 21 Sep 2009 13:20:22 +0100 Subject: Added disableBlit flag to (Symbian-specific version of) QWExtra This flag causes QSymbianControl::Draw not to blit the widget's region of the backing store. This is to support use cases such as video, which require that Qt does not modify the screen region occupied by the widget. --- src/gui/kernel/qapplication_s60.cpp | 4 +++- src/gui/kernel/qwidget_p.h | 7 +++++++ src/gui/kernel/qwidget_s60.cpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index d163b37e..07976fa 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -629,7 +629,8 @@ void QSymbianControl::Draw(const TRect& r) const << "surface" << surface << "engine" << engine << "raster" << (engine ? engine->type() == QPaintEngine::Raster : false) - << "opaque" << (qwidget->d_func()->isOpaque); + << "opaque" << (qwidget->d_func()->isOpaque) + << "disableBlit" << (qwidget->d_func()->extraData()->disableBlit); #endif if (!engine) @@ -666,6 +667,7 @@ void QSymbianControl::Draw(const TRect& r) const if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); + if(!qwidget->d_func()->extraData()->disableBlit) gc.BitBlt(r.iTl, bitmap, r); } else { surface->flush(qwidget, QRegion(qt_TRect2QRect(r)), QPoint()); diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index f4b9a4c..c890313 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -225,6 +225,13 @@ struct QWExtra { #endif #elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian uint activated : 1; // RWindowBase::Activated has been called + + // If set, QSymbianControl::Draw does not blit this widget + // This is to allow, for use cases such as video, widgets which, from the Qt point + // of view, are just placeholders in the scene. For these widgets, any necessary + // drawing to the UI framebuffer is done by the relevant Symbian subsystem. For + // video rendering, this would be an MMF controller, or MDF post-processor. + uint disableBlit : 1; #endif }; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 0f69354..53a108b 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1160,6 +1160,7 @@ void QWidgetPrivate::deleteTLSysExtra() void QWidgetPrivate::createSysExtra() { extra->activated = 0; + extra->disableBlit = 0; } void QWidgetPrivate::deleteSysExtra() -- cgit v0.12