When using transparency, don't compute new value when pixel is already fully opaque

This makes the code slightly more efficient, and should not affect the
generated map at all.
master
Rogier 2015-06-07 21:30:45 +02:00
parent 4e6ee97936
commit 673e8c6723
1 changed files with 2 additions and 0 deletions

View File

@ -259,6 +259,8 @@ void PixelAttribute::mixUnder(const PixelAttribute &p)
}
m_h = p.m_h;
}
else if (m_a == 1)
; // Nothing to do: pixel is already fully opaque.
else if ((m_mixMode & AlphaMixCumulative) == AlphaMixCumulative || (m_mixMode == AlphaMixAverage && p.m_a == 1)) {
PixelAttribute pp(p);
#ifdef DEBUG