mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917943 - Fix color-burn and color-dodge blend modes for Direct2D. r=Bas
This commit is contained in:
parent
86236f7d71
commit
8614b1d5ca
@ -300,18 +300,27 @@ float4 SampleBlendTextureSeparablePS_1( VS_OUTPUT In) : SV_Target
|
||||
} else if(blendop == 5) {
|
||||
retval.rgb = max(output.rgb, background.rgb);
|
||||
} else {
|
||||
if(output.r > 0)
|
||||
retval.r = 1 - min(1, (1 - background.r) / output.r);
|
||||
else
|
||||
retval.r = background.r ? 1 : 0;
|
||||
if(output.g > 0)
|
||||
retval.g = 1 - min(1, (1 - background.g) / output.g);
|
||||
else
|
||||
retval.g = background.g ? 1 : 0;
|
||||
if(output.b > 0)
|
||||
retval.b = 1 - min(1, (1 - background.b) / output.b);
|
||||
else
|
||||
retval.b = background.b ? 1 : 0;
|
||||
if(background.r == 0)
|
||||
retval.r = 0;
|
||||
else
|
||||
if(output.r == 1)
|
||||
retval.r = 1;
|
||||
else
|
||||
retval.r = min(1, background.r / (1 - output.r));
|
||||
if(background.g == 0)
|
||||
retval.g = 0;
|
||||
else
|
||||
if(output.g == 1)
|
||||
retval.g = 1;
|
||||
else
|
||||
retval.g = min(1, background.g / (1 - output.g));
|
||||
if(background.b == 0)
|
||||
retval.b = 0;
|
||||
else
|
||||
if(output.b == 1)
|
||||
retval.b = 1;
|
||||
else
|
||||
retval.b = min(1, background.b / (1 - output.b));
|
||||
}
|
||||
|
||||
output.rgb = ((1 - background.a) * output.rgb + background.a * retval.rgb) * output.a;
|
||||
@ -331,18 +340,27 @@ float4 SampleBlendTextureSeparablePS_2( VS_OUTPUT In) : SV_Target
|
||||
float4 retval = output;
|
||||
|
||||
if(blendop == 7) {
|
||||
if(output.r > 0)
|
||||
if(background.r == 1)
|
||||
retval.r = 1;
|
||||
else
|
||||
if(output.r == 0)
|
||||
retval.r = 0;
|
||||
else
|
||||
retval.r = 1 - min(1, (1 - background.r) / output.r);
|
||||
if(background.g == 1)
|
||||
retval.g = 1;
|
||||
else
|
||||
if(output.g == 0)
|
||||
retval.g = 0;
|
||||
else
|
||||
retval.r = background.r ? 1 : 0;
|
||||
if(output.g > 0)
|
||||
retval.g = 1 - min(1, (1 - background.g) / output.g);
|
||||
if(background.b == 1)
|
||||
retval.b = 1;
|
||||
else
|
||||
if(output.b == 0)
|
||||
retval.b = 0;
|
||||
else
|
||||
retval.g = background.g ? 1 : 0;
|
||||
if(output.b > 0)
|
||||
retval.b = 1 - min(1, (1 - background.b) / output.b);
|
||||
else
|
||||
retval.b = background.b ? 1 : 0;
|
||||
} else if(blendop == 8) {
|
||||
if(output.r <= 0.5)
|
||||
retval.r = 2 * output.r * background.r;
|
||||
|
16011
gfx/2d/ShadersD2D.h
16011
gfx/2d/ShadersD2D.h
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20499
|
||||
//
|
||||
//
|
||||
///
|
||||
@ -151,10 +151,10 @@ ret
|
||||
|
||||
const BYTE SampleRadialGradientPS[] =
|
||||
{
|
||||
68, 88, 66, 67, 215, 144,
|
||||
212, 127, 245, 34, 39, 73,
|
||||
96, 47, 76, 239, 115, 172,
|
||||
47, 64, 1, 0, 0, 0,
|
||||
68, 88, 66, 67, 4, 219,
|
||||
16, 81, 206, 189, 193, 71,
|
||||
226, 68, 226, 173, 220, 207,
|
||||
39, 117, 1, 0, 0, 0,
|
||||
172, 10, 0, 0, 6, 0,
|
||||
0, 0, 56, 0, 0, 0,
|
||||
192, 2, 0, 0, 40, 7,
|
||||
@ -575,8 +575,8 @@ const BYTE SampleRadialGradientPS[] =
|
||||
100, 101, 114, 32, 67, 111,
|
||||
109, 112, 105, 108, 101, 114,
|
||||
32, 57, 46, 51, 48, 46,
|
||||
57, 50, 48, 48, 46, 49,
|
||||
54, 51, 56, 52, 0, 171,
|
||||
57, 50, 48, 48, 46, 50,
|
||||
48, 52, 57, 57, 0, 171,
|
||||
73, 83, 71, 78, 116, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
8, 0, 0, 0, 80, 0,
|
||||
@ -610,7 +610,7 @@ const BYTE SampleRadialGradientPS[] =
|
||||
};
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20499
|
||||
//
|
||||
//
|
||||
///
|
||||
@ -739,10 +739,10 @@ ret
|
||||
|
||||
const BYTE SampleRadialGradientA0PS[] =
|
||||
{
|
||||
68, 88, 66, 67, 67, 228,
|
||||
119, 188, 222, 208, 62, 54,
|
||||
201, 121, 212, 21, 98, 33,
|
||||
252, 111, 1, 0, 0, 0,
|
||||
68, 88, 66, 67, 227, 152,
|
||||
213, 20, 197, 162, 168, 90,
|
||||
89, 231, 97, 2, 105, 222,
|
||||
132, 225, 1, 0, 0, 0,
|
||||
152, 8, 0, 0, 6, 0,
|
||||
0, 0, 56, 0, 0, 0,
|
||||
20, 2, 0, 0, 20, 5,
|
||||
@ -1075,7 +1075,7 @@ const BYTE SampleRadialGradientA0PS[] =
|
||||
67, 111, 109, 112, 105, 108,
|
||||
101, 114, 32, 57, 46, 51,
|
||||
48, 46, 57, 50, 48, 48,
|
||||
46, 49, 54, 51, 56, 52,
|
||||
46, 50, 48, 52, 57, 57,
|
||||
0, 171, 73, 83, 71, 78,
|
||||
116, 0, 0, 0, 3, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
|
@ -369,8 +369,8 @@ skip-if(B2G) == tspan-xy-anchor-end-01.svg tspan-xy-anchor-end-ref.svg # bug 773
|
||||
== href-attr-change-restyles.svg href-attr-change-restyles-ref.svg
|
||||
== mask-img.html mask-img-ref.html
|
||||
|
||||
skip-if(d2d||B2G||(Android&&AndroidVersion<15)) pref(layout.css.mix-blend-mode.enabled,true) == blend-color-burn.svg blend-color-burn-ref.svg
|
||||
skip-if(d2d||B2G||(Android&&AndroidVersion<15)) pref(layout.css.mix-blend-mode.enabled,true) == blend-color-dodge.svg blend-color-dodge-ref.svg
|
||||
skip-if(B2G||(Android&&AndroidVersion<15)) pref(layout.css.mix-blend-mode.enabled,true) == blend-color-burn.svg blend-color-burn-ref.svg
|
||||
skip-if(B2G||(Android&&AndroidVersion<15)) pref(layout.css.mix-blend-mode.enabled,true) == blend-color-dodge.svg blend-color-dodge-ref.svg
|
||||
# pref(layout.css.mix-blend-mode.enabled,true) == blend-color.svg blend-color-ref.svg
|
||||
skip-if(B2G||(Android&&AndroidVersion<15)) pref(layout.css.mix-blend-mode.enabled,true) == blend-darken.svg blend-darken-ref.svg
|
||||
skip-if(B2G||(Android&&AndroidVersion<15)) pref(layout.css.mix-blend-mode.enabled,true) == blend-difference.svg blend-difference-ref.svg
|
||||
|
Loading…
Reference in New Issue
Block a user