summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/videooutput.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-09-21 12:23:44 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-23 12:39:47 (GMT)
commitf247b4d6c6a2b2b8354fbfd5a68f2a5449bdccf4 (patch)
tree5235046858bbe4dc8606d11edf3793cacd69dc85 /src/3rdparty/phonon/mmf/videooutput.cpp
parentd08436fbe0bd8da16aec2a0936c7d768e4045bfa (diff)
downloadQt-f247b4d6c6a2b2b8354fbfd5a68f2a5449bdccf4.zip
Qt-f247b4d6c6a2b2b8354fbfd5a68f2a5449bdccf4.tar.gz
Qt-f247b4d6c6a2b2b8354fbfd5a68f2a5449bdccf4.tar.bz2
Removed transparency-blitting / -painting code from video widget
Diffstat (limited to 'src/3rdparty/phonon/mmf/videooutput.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp105
1 files changed, 1 insertions, 104 deletions
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index 58fa25d..b77a831 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -29,17 +29,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QMoveEvent>
#include <QResizeEvent>
-// Required for implementation of transparentFill (direct write to backing store)
-#include <QtGui/private/qwidget_p.h>
-#include <QtGui/private/qdrawhelper_p.h>
-#include <QtGui/private/qwindowsurface_p.h>
-#include <QImage>
-
-// Required for implementation of transparentFill (GC brush)
-#include <coecntrl.h>
-#include <w32std.h>
-#include <eikenv.h>
-
QT_BEGIN_NAMESPACE
@@ -124,99 +113,7 @@ void MMF::VideoOutput::paintEvent(QPaintEvent* event)
dump();
-#ifdef PHONON_MMF_DIRECT_WRITE_ALPHA
- transparentFill(event->region().rects());
-#else
- // Note: composition mode code was a failed attempt to get transparent
- // alpha values to be propagated to the (EColor16MU) window surface.
-
- QPainter painter;
- //const QPainter::CompositionMode compositionMode = painter.compositionMode();
- //painter.setCompositionMode(QPainter::CompositionMode_Source);
- painter.begin(this);
- painter.setBrush(QColor(0, 0, 0, 0));
- painter.drawRects(event->region().rects());
- painter.end();
- //painter.setCompositionMode(compositionMode);
-#endif
-}
-
-void MMF::VideoOutput::transparentFill(const QVector<QRect>& rects)
-{
- TRACE_CONTEXT(VideoOutput::transparentFill, EVideoInternal);
- TRACE_ENTRY_0();
-
-/*
- // Graphics context brushing approach
- RWindow *const window = static_cast<RWindow *>(winId()->DrawableWindow());
- const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
- CWindowGc& gc = CEikonEnv::Static()->SystemGc();
- gc.Activate(*window);
- gc.SetBrushColor(TRgb(255, 255, 255, 0));
- gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
- gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
- window->Invalidate();
- window->BeginRedraw();
- gc.Clear();
- window->EndRedraw();
- gc.Deactivate();
-*/
-
-/*
- // Direct draw into backing store approach (entire TLW)
- QImage *image = window()->windowSurface()->buffer(window());
- QRgb *data = reinterpret_cast<QRgb *>(image->bits());
- const int row_stride = image->bytesPerLine() / 4;
-
- const QRgb color =
- //0xff0000ff // opaque blue
- 0x000000ff // transparent blue
- //0x00000000 // transparent black
- ;
-
- // Paint the entire surface
- const int imageWidth = image->size().width();
- const int imageHeight = image->size().height();
- QRgb *row = data;
- for(int y=0; y<imageHeight; ++y) {
-
- QRgb *ptr = row;
- for(int x=0; x<imageWidth; ++x)
- *ptr++ = color;
- row += row_stride;
- }
-*/
-
-/*
- // Direct draw into backing store approach (specified regions)
- for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) {
-
- const QRect& rect = *it;
-
- TRACE("%d %d size %d x %d", rect.x(), rect.y(), rect.width(), rect.height());
-
- const int x_start = rect.x();
- const int width = rect.width();
-
- const int y_start = rect.y();
- const int height = rect.height();
-
- QRgb *row = data + row_stride * y_start;
- for (int y = 0; y < height; ++y) {
-
- // Note: not using the optimised qt_memfill function implemented in
- // gui/painting/qdrawhelper.cpp - can we somehow link against this?
-
- QRgb *ptr = row + x_start;
- for(int x = 0; x < width; ++x)
- *ptr++ = 0x00000000;
-
- row += row_stride;
- }
- }
-*/
-
- TRACE_EXIT_0();
+ // Do not paint anything
}
void MMF::VideoOutput::resizeEvent(QResizeEvent* event)