• Dmitry Kazakov's avatar
    Fix composite copy to use classical OVER algorithm on semi-transparent data · 27cccdcd
    Dmitry Kazakov authored
    Now when source and destination have non-transparent pixels
    we use straightforward OVER algorithm that does expected things:
    1) Premultiplies src and dst
    2) Blends them using opacity and mask
    3) Unmultiplies the value to write into the destination
    This algo is even more complex than the one used in COMPOSIRTE_OVER
    (yes, we use approximation) and works about 50% slower than OVER.
    But since most of the time COMPOSITE_COPY is applied without mask the
    slowdown will be hardly seen.
stroke_testing_utils.cpp 10.7 KB