Commit 148bc356 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix speed regression when painting in BuildUp mode on a Transparent Layer with a Transparency Mask

The KisSelectionDefaultBounds should not call exactBounds() every time,
since it would result in constant boudns recalculation when the user
paints in BuildUp mode (which is always the case for ColorSmudgeOp).

BUG:320213
parent 601c388a
......@@ -83,7 +83,7 @@ KisSelectionDefaultBounds::~KisSelectionDefaultBounds()
QRect KisSelectionDefaultBounds::bounds() const
{
QRect additionalRect = m_d->parentDevice ? m_d->parentDevice->exactBounds() : QRect();
QRect additionalRect = m_d->parentDevice ? m_d->parentDevice->extent() : QRect();
return additionalRect | KisDefaultBounds::bounds();
}
......
......@@ -851,7 +851,6 @@ KisRandomConstAccessorSP KisPaintDevice::createRandomConstAccessorNG(qint32 x, q
KisRandomSubAccessorSP KisPaintDevice::createRandomSubAccessor() const
{
m_d->cache.invalidate();
KisPaintDevice* pd = const_cast<KisPaintDevice*>(this);
return new KisRandomSubAccessor(pd);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment