diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-09-21 12:12:56 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-09-23 12:39:45 (GMT) |
commit | d08436fbe0bd8da16aec2a0936c7d768e4045bfa (patch) | |
tree | 4e010d0a98838867fa8e025c6c11b834441e4818 /src | |
parent | f247454316e7226f79ae38237992c6470afe278a (diff) | |
download | Qt-d08436fbe0bd8da16aec2a0936c7d768e4045bfa.zip Qt-d08436fbe0bd8da16aec2a0936c7d768e4045bfa.tar.gz Qt-d08436fbe0bd8da16aec2a0936c7d768e4045bfa.tar.bz2 |
Removed hack in QSymbianControl for blitting a transparent bitmap in place of the backing store region
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/mmf/videoplayer.cpp | 22 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 13 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 29 |
3 files changed, 2 insertions, 62 deletions
diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp index cc56671..7b4626c 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/videoplayer.cpp @@ -30,8 +30,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "objectdump.h" #endif -#include <QtGui/private/qt_s60_p.h> // for QSymbianControl - QT_BEGIN_NAMESPACE using namespace Phonon; @@ -405,28 +403,12 @@ void MMF::VideoPlayer::getNativeWindowSystemHandles() VideoOutput& output = videoOutput(); CCoeControl* const control = output.winId(); - - // Inform control that it needs to brush rather than blit the backing store - QSymbianControl* const symbianControl = static_cast<QSymbianControl *>(control); - //symbianControl->setBlit(0xff00ff00); // opaque green - //symbianControl->setBlit(0x0000ff00); // transparent green - symbianControl->setBlit(0x00000000); // transparent black - + CCoeEnv* const coeEnv = control->ControlEnv(); m_wsSession = &(coeEnv->WsSession()); m_screenDevice = coeEnv->ScreenDevice(); m_window = control->DrawableWindow(); - -/* - // Set background window color - RWindow *const window = static_cast<RWindow *>(m_window); - const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); - //const TInt err = window->SetTransparencyAlphaChannel(); - //if (err == KErrNone) - window->SetBackgroundColor(TRgb(255, 0, 255, 255)); - window->Invalidate(); // force a redraw -*/ - + #ifdef _DEBUG QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper); dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index e3f3376..4c96a2a 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -666,14 +666,6 @@ void QSymbianControl::Draw(const TRect& r) const if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); - if(m_bitmap.data()) { - //gc.BitBlt(r.iTl, m_bitmap.data(), TRect(TPoint(), r.Size())); - - gc.SetBrushColor(TRgb(0, 0, 0, 0)); - gc.SetBrushStyle(CGraphicsContext::ESolidBrush); - gc.Clear(r); - } - else gc.BitBlt(r.iTl, bitmap, r); } else { surface->flush(qwidget, QRegion(qt_TRect2QRect(r)), QPoint()); @@ -709,11 +701,6 @@ void QSymbianControl::SizeChanged() if (!slowResize && tlwExtra) tlwExtra->inTopLevelResize = false; } - - if(m_bitmap.data()) { - m_bitmap->Resize(Size()); - fillBitmap(); - } } } diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 5331504..5870e2c 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -146,8 +146,6 @@ public: void sendInputEvent(QWidget *widget, QInputEvent *inputEvent); void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; } void CancelLongTapTimer(); - - void setBlit(TUint32 color); protected: void Draw(const TRect& aRect) const; @@ -161,41 +159,14 @@ private: TKeyResponse sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent); void sendMouseEvent(QWidget *widget, QMouseEvent *mEvent); void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); - - void fillBitmap(); private: QWidget *qwidget; bool m_ignoreFocusChanged; QLongTapTimer* m_longTapDetector; bool m_previousEventLongTap; - - QScopedPointer<CFbsBitmap> m_bitmap; - TUint32 m_color; }; - - -inline void QSymbianControl::setBlit(TUint32 color) -{ - m_bitmap.reset( q_check_ptr(new CFbsBitmap) ); // CBase derived object needs check on new - qt_symbian_throwIfError( m_bitmap->Create(Size(), EColor16MA) ); - - // Not sure if bitmap pixel data is zero-initialized, so do it here to make sure - m_color = color; - fillBitmap(); -} - -inline void QSymbianControl::fillBitmap() -{ - TUint32* ptr = m_bitmap->DataAddress(); - for(int y=0; y<Size().iHeight; ++y) - for(int x=0; x<Size().iWidth; ++x) - *ptr++ = m_color; -} - - - inline void QS60Data::updateScreenSize() { TPixelsTwipsAndRotation params; |