diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-09-16 17:26:53 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-09-23 12:36:40 (GMT) |
commit | a4c600e205a79c5dfc7657b792374a8ce9e308d0 (patch) | |
tree | c98b3378c68893e813c64d0977efb34e7f22d9a8 /src | |
parent | 13850822dafa6e3e5976b1ea7644403e6caec4f4 (diff) | |
download | Qt-a4c600e205a79c5dfc7657b792374a8ce9e308d0.zip Qt-a4c600e205a79c5dfc7657b792374a8ce9e308d0.tar.gz Qt-a4c600e205a79c5dfc7657b792374a8ce9e308d0.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
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<QS60WindowSurface *>(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*10<bitmap->SizeInPixels().iWidth and i*10<bitmap->SizeInPixels().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); |