|
Krita Source Code Documentation
|
#include <KoOptimizedCompositeOpCopy128.h>
Classes | |
| struct | ParamsWrapper |
| struct | Pixel |
Static Public Member Functions | |
| template<bool haveMask, typename _impl = xsimd::current_arch> | |
| static ALWAYS_INLINE void | compositeOnePixelScalar (const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, const ParamsWrapper &oparams) |
| template<bool haveMask, bool src_aligned, typename _impl > | |
| static ALWAYS_INLINE void | compositeVector (const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, const ParamsWrapper &oparams) |
Definition at line 19 of file KoOptimizedCompositeOpCopy128.h.
|
inlinestatic |
Definition at line 142 of file KoOptimizedCompositeOpCopy128.h.
References CopyCompositor128< channels_type, alphaLocked, allChannelsFlag >::ParamsWrapper::channelFlags.
|
inlinestatic |
This division by newAlpha may be unsafe in case some elements of newAlpha are null. We don't care, because:
1) the value will be clamped by xsimd::min a bit later;
2) even if it doesn't, the new alpha will be null, so the state of the color channels is undefined
Roundtrip dst * dst_alpha / newAlpha may not be possible (it happens when mask (and therefore opacity) is null). In such case we should recover original value of the pixels to be consistent with the scalar version of the algorithm.
Definition at line 36 of file KoOptimizedCompositeOpCopy128.h.
References KoStreamedMath< _impl >::fetch_mask_8(), and PixelStateRecoverHelper< channels_type, _impl >::recoverPixels().