aboutToDraw() should be called before checking the painter device,
if no device, aboutToDraw() will create a new one.
Also just release the FBO when delete tile, not need to release the fbo
after each draw.
Change-Id: Ida5954f1c65f25f0ce273f732c1608ed49bc148c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
if (m_painter.isActive())
m_painter.end();
+ aboutToDraw();
if (m_device) {
- aboutToDraw();
m_painter.begin(m_device);
m_painter.resetTransform();
m_painter.setCompositionMode(QPainter::CompositionMode_Source);
QQuickContext2DFBOTile::~QQuickContext2DFBOTile()
{
+ if (m_fbo)
+ m_fbo->release();
delete m_fbo;
}
void QQuickContext2DFBOTile::drawFinished()
{
- m_fbo->release();
}
void QQuickContext2DFBOTile::setRect(const QRect& r)