From a4c600e205a79c5dfc7657b792374a8ce9e308d0 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 16 Sep 2009 18:26:53 +0100 Subject: Added extra logging to QSymbianControl::Draw This function now dumps the colors of a sample of pixels in the bitmap about to be blitted. This is useful in debugging problems to do with visibility of video when running on target. --- src/gui/kernel/qapplication_s60.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 2a71073..f142053 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -639,7 +639,9 @@ void QSymbianControl::Draw(const TRect& r) const << "rect " << r.iTl.iX << ',' << r.iTl.iY << '-' << r.iBr.iX << ',' << r.iBr.iY << "surface" << surface - << "engine" << engine; + << "engine" << engine + << "raster" << (engine ? engine->type() == QPaintEngine::Raster : false) + << "opaque" << (qwidget->d_func()->isOpaque); #endif if (!engine) @@ -648,6 +650,18 @@ void QSymbianControl::Draw(const TRect& r) const if (engine->type() == QPaintEngine::Raster) { QS60WindowSurface *s60Surface = static_cast(qwidget->windowSurface()); CFbsBitmap *bitmap = s60Surface->symbianBitmap(); + +#ifdef DEBUG_QSYMBIANCONTROL + const TDisplayMode displayMode = bitmap->DisplayMode(); + qDebug() << "QSymbianControl::Draw [" << this << "]" + << "mode " << displayMode; + for(int i=0; i<10 and i*10SizeInPixels().iWidth and i*10SizeInPixels().iHeight; ++i) { + TRgb color; + bitmap->GetPixel(color, TPoint(i*10, i*10)); + qDebug() << " " << i*10 << " : " << color.Red() << color.Green() << color.Blue() << color.Alpha(); + } +#endif + CWindowGc &gc = SystemGc(); if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); -- cgit v0.12