Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c4503779
Commit
c4503779
authored
Jul 29, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Take the bitmap's alpha mode into account in bitmap brushes.
parent
d742887b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
17 deletions
+24
-17
brush.c
dlls/d2d1/brush.c
+13
-11
render_target.c
dlls/d2d1/render_target.c
+11
-6
No files found.
dlls/d2d1/brush.c
View file @
c4503779
...
...
@@ -728,8 +728,9 @@ HRESULT d2d_brush_get_ps_cb(struct d2d_brush *brush, struct d2d_d3d_render_targe
struct
{
float
_11
,
_21
,
_31
,
pad0
;
float
_12
,
_22
,
_32
,
pad1
;
}
transform
;
float
_12
,
_22
,
_32
,
opacity
;
BOOL
ignore_alpha
;
}
bitmap_brush_cb
;
D2D1_COLOR_F
color
;
HRESULT
hr
;
...
...
@@ -783,17 +784,18 @@ HRESULT d2d_brush_get_ps_cb(struct d2d_brush *brush, struct d2d_d3d_render_targe
d
=
b
.
_11
*
b
.
_22
-
b
.
_21
*
b
.
_12
;
if
(
d
!=
0
.
0
f
)
{
transform
.
_11
=
b
.
_22
/
d
;
transform
.
_21
=
-
b
.
_21
/
d
;
transform
.
_31
=
(
b
.
_21
*
b
.
_32
-
b
.
_31
*
b
.
_22
)
/
d
;
transform
.
_12
=
-
b
.
_12
/
d
;
transform
.
_22
=
b
.
_11
/
d
;
transform
.
_32
=
-
(
b
.
_11
*
b
.
_32
-
b
.
_31
*
b
.
_12
)
/
d
;
bitmap_brush_cb
.
_11
=
b
.
_22
/
d
;
bitmap_brush_cb
.
_21
=
-
b
.
_21
/
d
;
bitmap_brush_cb
.
_31
=
(
b
.
_21
*
b
.
_32
-
b
.
_31
*
b
.
_22
)
/
d
;
bitmap_brush_cb
.
_12
=
-
b
.
_12
/
d
;
bitmap_brush_cb
.
_22
=
b
.
_11
/
d
;
bitmap_brush_cb
.
_32
=
-
(
b
.
_11
*
b
.
_32
-
b
.
_31
*
b
.
_12
)
/
d
;
}
transform
.
pad1
=
brush
->
opacity
;
bitmap_brush_cb
.
opacity
=
brush
->
opacity
;
bitmap_brush_cb
.
ignore_alpha
=
bitmap
->
format
.
alphaMode
==
D2D1_ALPHA_MODE_IGNORE
;
buffer_desc
.
ByteWidth
=
sizeof
(
transform
);
buffer_data
.
pSysMem
=
&
transform
;
buffer_desc
.
ByteWidth
=
sizeof
(
bitmap_brush_cb
);
buffer_data
.
pSysMem
=
&
bitmap_brush_cb
;
}
else
{
...
...
dlls/d2d1/render_target.c
View file @
c4503779
...
...
@@ -1564,6 +1564,7 @@ HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target,
#if 0
float3x2 transform;
float opacity;
bool ignore_alpha;
SamplerState s;
Texture2D t;
...
...
@@ -1576,26 +1577,30 @@ HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target,
texcoord.x = position.x * transform._11 + position.y * transform._21 + transform._31;
texcoord.y = position.x * transform._12 + position.y * transform._22 + transform._32;
ret = t.Sample(s, texcoord);
ret.a *= opacity;
if (ignore_alpha)
ret.a = opacity;
else
ret.a *= opacity;
return ret;
}
#endif
0x43425844
,
0x
9a5f9280
,
0xa5351c23
,
0x15d6e760
,
0xce35bcc3
,
0x00000001
,
0x000001d0
,
0x00000003
,
0x43425844
,
0x
f2e9967c
,
0xad1d1ac2
,
0x865274b8
,
0x6ab4c5ca
,
0x00000001
,
0x000001fc
,
0x00000003
,
0x0000002c
,
0x00000060
,
0x00000094
,
0x4e475349
,
0x0000002c
,
0x00000001
,
0x00000008
,
0x00000020
,
0x00000000
,
0x00000001
,
0x00000003
,
0x00000000
,
0x0000030f
,
0x505f5653
,
0x5449534f
,
0x004e4f49
,
0x4e47534f
,
0x0000002c
,
0x00000001
,
0x00000008
,
0x00000020
,
0x00000000
,
0x00000000
,
0x00000003
,
0x00000000
,
0x0000000f
,
0x545f5653
,
0x65677261
,
0xabab0074
,
0x52444853
,
0x000001
34
,
0x00000040
,
0x000000
4d
,
0x04000059
,
0x00208e46
,
0x00000000
,
0x00000002
,
0x0300005a
,
0x00106000
,
0x00000000
,
0x00000000
,
0x0000000f
,
0x545f5653
,
0x65677261
,
0xabab0074
,
0x52444853
,
0x000001
60
,
0x00000040
,
0x000000
58
,
0x04000059
,
0x00208e46
,
0x00000000
,
0x00000003
,
0x0300005a
,
0x00106000
,
0x00000000
,
0x04001858
,
0x00107000
,
0x00000000
,
0x00005555
,
0x04002064
,
0x00101032
,
0x00000000
,
0x00000001
,
0x03000065
,
0x001020f2
,
0x00000000
,
0x02000068
,
0x00000001
,
0x0800000f
,
0x00100012
,
0x00000000
,
0x00101046
,
0x00000000
,
0x00208046
,
0x00000000
,
0x00000000
,
0x08000000
,
0x00100012
,
0x00000000
,
0x0010000a
,
0x00000000
,
0x0020802a
,
0x00000000
,
0x00000000
,
0x0800000f
,
0x00100042
,
0x00000000
,
0x00101046
,
0x00000000
,
0x00208046
,
0x00000000
,
0x00000001
,
0x08000000
,
0x00100022
,
0x00000000
,
0x0010002a
,
0x00000000
,
0x0020802a
,
0x00000000
,
0x00000001
,
0x09000045
,
0x001000f2
,
0x00000000
,
0x00100046
,
0x00000000
,
0x00107e46
,
0x00000000
,
0x00106000
,
0x00000000
,
0x08000038
,
0x0010
2
082
,
0x00100046
,
0x00000000
,
0x00107e46
,
0x00000000
,
0x00106000
,
0x00000000
,
0x08000038
,
0x0010
0
082
,
0x00000000
,
0x0010003a
,
0x00000000
,
0x0020803a
,
0x00000000
,
0x00000001
,
0x05000036
,
0x00102072
,
0x00000000
,
0x00100246
,
0x00000000
,
0x0100003e
,
0x00000000
,
0x00100246
,
0x00000000
,
0x0b000037
,
0x00102082
,
0x00000000
,
0x0020800a
,
0x00000000
,
0x00000002
,
0x0020803a
,
0x00000000
,
0x00000001
,
0x0010003a
,
0x00000000
,
0x0100003e
,
};
/* The basic idea here is to evaluate the implicit form of the curve in
* texture space. "t.z" determines which side of the curve is shaded. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment