Bug 1656813 - Set correct blend mode for non-premultiplied alpha. r=gw

I believe this is correct for blending a non-premuliplied source into a premultiplied destination. Only the source color part should be different to normal blending, since it needs to be multiplied by the source alpha channel.

Differential Revision: https://phabricator.services.mozilla.com/D85716
This commit is contained in:
Matt Woodrow 2020-08-05 00:54:36 +00:00
parent 1885d56be1
commit 1d129542c3

View File

@ -3532,7 +3532,7 @@ impl Device {
pub fn set_blend_mode_alpha(&mut self) {
self.set_blend_factors(
(gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA),
(gl::ONE, gl::ONE),
(gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
);
}