Commit bed45070 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).

parent 13671c09
......@@ -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
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