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.
This commit is contained in:
parent
4e6ee97936
commit
673e8c6723
@ -259,6 +259,8 @@ void PixelAttribute::mixUnder(const PixelAttribute &p)
|
|||||||
}
|
}
|
||||||
m_h = p.m_h;
|
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)) {
|
else if ((m_mixMode & AlphaMixCumulative) == AlphaMixCumulative || (m_mixMode == AlphaMixAverage && p.m_a == 1)) {
|
||||||
PixelAttribute pp(p);
|
PixelAttribute pp(p);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user