I've solved my problem by clearing contents of rectangle of video element while 
keeping the region available for further drawing.

I'm using QtWebKit port and my code is like this:

void MediaPlayerPrivateXXX::paint(GraphicsContext *context, const IntRect &rect)
{
    if (context->paintingDisabled())
        return;

    if (!m_isVisible)
        return;

    QPainter* painter = context->platformContext();
    QRect qrect = QRect(rect);
    if (paused()) {
        // draw captured image of paused frame
    } else {
        painter->save();
        painter->setBrush(QBrush(Qt::transparent));
    // The next line is the key
        painter->setCompositionMode(QPainter::CompositionMode_Clear);
        painter->drawRect(qrect);
        painter->restore();
    }
}

It works equally with or without enabled accelerated compositing.

-- 
Regards,
Konstantin
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to