Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
70883bb0
Commit
70883bb0
authored
Mar 27, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Use a D2D1_DRAWING_STATE_DESCRIPTION structure to store render target drawing state.
parent
fd4b0532
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
25 deletions
+26
-25
d2d1_private.h
dlls/d2d1/d2d1_private.h
+1
-4
render_target.c
dlls/d2d1/render_target.c
+25
-21
No files found.
dlls/d2d1/d2d1_private.h
View file @
70883bb0
...
@@ -64,13 +64,10 @@ struct d2d_d3d_render_target
...
@@ -64,13 +64,10 @@ struct d2d_d3d_render_target
ID3D10PixelShader
*
rect_solid_ps
;
ID3D10PixelShader
*
rect_solid_ps
;
ID3D10PixelShader
*
rect_bitmap_ps
;
ID3D10PixelShader
*
rect_bitmap_ps
;
D2D1_ANTIALIAS_MODE
antialias_mode
;
D2D1_DRAWING_STATE_DESCRIPTION
drawing_state
;
D2D1_TEXT_ANTIALIAS_MODE
text_antialias_mode
;
D2D1_TAG
tag1
,
tag2
;
IDWriteRenderingParams
*
text_rendering_params
;
IDWriteRenderingParams
*
text_rendering_params
;
D2D1_SIZE_U
pixel_size
;
D2D1_SIZE_U
pixel_size
;
D2D1_MATRIX_3X2_F
transform
;
struct
d2d_clip_stack
clip_stack
;
struct
d2d_clip_stack
clip_stack
;
float
dpi_x
;
float
dpi_x
;
float
dpi_y
;
float
dpi_y
;
...
...
dlls/d2d1/render_target.c
View file @
70883bb0
...
@@ -558,13 +558,13 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_FillRectangle(ID2D1RenderTar
...
@@ -558,13 +558,13 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_FillRectangle(ID2D1RenderTar
* dpi and rendertarget transform into account. */
* dpi and rendertarget transform into account. */
tmp_x
=
(
2
.
0
f
*
render_target
->
dpi_x
)
/
(
96
.
0
f
*
render_target
->
pixel_size
.
width
);
tmp_x
=
(
2
.
0
f
*
render_target
->
dpi_x
)
/
(
96
.
0
f
*
render_target
->
pixel_size
.
width
);
tmp_y
=
-
(
2
.
0
f
*
render_target
->
dpi_y
)
/
(
96
.
0
f
*
render_target
->
pixel_size
.
height
);
tmp_y
=
-
(
2
.
0
f
*
render_target
->
dpi_y
)
/
(
96
.
0
f
*
render_target
->
pixel_size
.
height
);
transform
.
_11
=
render_target
->
transform
.
_11
*
tmp_x
;
transform
.
_11
=
render_target
->
drawing_state
.
transform
.
_11
*
tmp_x
;
transform
.
_21
=
render_target
->
transform
.
_21
*
tmp_x
;
transform
.
_21
=
render_target
->
drawing_state
.
transform
.
_21
*
tmp_x
;
transform
.
_31
=
render_target
->
transform
.
_31
*
tmp_x
-
1
.
0
f
;
transform
.
_31
=
render_target
->
drawing_state
.
transform
.
_31
*
tmp_x
-
1
.
0
f
;
transform
.
pad0
=
0
.
0
f
;
transform
.
pad0
=
0
.
0
f
;
transform
.
_12
=
render_target
->
transform
.
_12
*
tmp_y
;
transform
.
_12
=
render_target
->
drawing_state
.
transform
.
_12
*
tmp_y
;
transform
.
_22
=
render_target
->
transform
.
_22
*
tmp_y
;
transform
.
_22
=
render_target
->
drawing_state
.
transform
.
_22
*
tmp_y
;
transform
.
_32
=
render_target
->
transform
.
_32
*
tmp_y
+
1
.
0
f
;
transform
.
_32
=
render_target
->
drawing_state
.
transform
.
_32
*
tmp_y
+
1
.
0
f
;
transform
.
pad1
=
0
.
0
f
;
transform
.
pad1
=
0
.
0
f
;
/* Translate from world space to object space. */
/* Translate from world space to object space. */
...
@@ -816,7 +816,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTransform(ID2D1RenderTarg
...
@@ -816,7 +816,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTransform(ID2D1RenderTarg
TRACE
(
"iface %p, transform %p.
\n
"
,
iface
,
transform
);
TRACE
(
"iface %p, transform %p.
\n
"
,
iface
,
transform
);
render_target
->
transform
=
*
transform
;
render_target
->
drawing_state
.
transform
=
*
transform
;
}
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_GetTransform
(
ID2D1RenderTarget
*
iface
,
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_GetTransform
(
ID2D1RenderTarget
*
iface
,
...
@@ -826,7 +826,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_GetTransform(ID2D1RenderTarg
...
@@ -826,7 +826,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_GetTransform(ID2D1RenderTarg
TRACE
(
"iface %p, transform %p.
\n
"
,
iface
,
transform
);
TRACE
(
"iface %p, transform %p.
\n
"
,
iface
,
transform
);
*
transform
=
render_target
->
transform
;
*
transform
=
render_target
->
drawing_state
.
transform
;
}
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_SetAntialiasMode
(
ID2D1RenderTarget
*
iface
,
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_SetAntialiasMode
(
ID2D1RenderTarget
*
iface
,
...
@@ -836,7 +836,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetAntialiasMode(ID2D1Render
...
@@ -836,7 +836,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetAntialiasMode(ID2D1Render
TRACE
(
"iface %p, antialias_mode %#x stub!
\n
"
,
iface
,
antialias_mode
);
TRACE
(
"iface %p, antialias_mode %#x stub!
\n
"
,
iface
,
antialias_mode
);
render_target
->
antialias_m
ode
=
antialias_mode
;
render_target
->
drawing_state
.
antialiasM
ode
=
antialias_mode
;
}
}
static
D2D1_ANTIALIAS_MODE
STDMETHODCALLTYPE
d2d_d3d_render_target_GetAntialiasMode
(
ID2D1RenderTarget
*
iface
)
static
D2D1_ANTIALIAS_MODE
STDMETHODCALLTYPE
d2d_d3d_render_target_GetAntialiasMode
(
ID2D1RenderTarget
*
iface
)
...
@@ -845,7 +845,7 @@ static D2D1_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_d3d_render_target_GetAntialiasM
...
@@ -845,7 +845,7 @@ static D2D1_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_d3d_render_target_GetAntialiasM
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
render_target
->
antialias_m
ode
;
return
render_target
->
drawing_state
.
antialiasM
ode
;
}
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_SetTextAntialiasMode
(
ID2D1RenderTarget
*
iface
,
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_SetTextAntialiasMode
(
ID2D1RenderTarget
*
iface
,
...
@@ -855,7 +855,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTextAntialiasMode(ID2D1Re
...
@@ -855,7 +855,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTextAntialiasMode(ID2D1Re
TRACE
(
"iface %p, antialias_mode %#x.
\n
"
,
iface
,
antialias_mode
);
TRACE
(
"iface %p, antialias_mode %#x.
\n
"
,
iface
,
antialias_mode
);
render_target
->
text_antialias_m
ode
=
antialias_mode
;
render_target
->
drawing_state
.
textAntialiasM
ode
=
antialias_mode
;
}
}
static
D2D1_TEXT_ANTIALIAS_MODE
STDMETHODCALLTYPE
d2d_d3d_render_target_GetTextAntialiasMode
(
ID2D1RenderTarget
*
iface
)
static
D2D1_TEXT_ANTIALIAS_MODE
STDMETHODCALLTYPE
d2d_d3d_render_target_GetTextAntialiasMode
(
ID2D1RenderTarget
*
iface
)
...
@@ -864,7 +864,7 @@ static D2D1_TEXT_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_d3d_render_target_GetTextA
...
@@ -864,7 +864,7 @@ static D2D1_TEXT_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_d3d_render_target_GetTextA
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
render_target
->
text_antialias_m
ode
;
return
render_target
->
drawing_state
.
textAntialiasM
ode
;
}
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_SetTextRenderingParams
(
ID2D1RenderTarget
*
iface
,
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_SetTextRenderingParams
(
ID2D1RenderTarget
*
iface
,
...
@@ -898,8 +898,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTags(ID2D1RenderTarget *i
...
@@ -898,8 +898,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTags(ID2D1RenderTarget *i
TRACE
(
"iface %p, tag1 %s, tag2 %s.
\n
"
,
iface
,
wine_dbgstr_longlong
(
tag1
),
wine_dbgstr_longlong
(
tag2
));
TRACE
(
"iface %p, tag1 %s, tag2 %s.
\n
"
,
iface
,
wine_dbgstr_longlong
(
tag1
),
wine_dbgstr_longlong
(
tag2
));
render_target
->
tag1
=
tag1
;
render_target
->
drawing_state
.
tag1
=
tag1
;
render_target
->
tag2
=
tag2
;
render_target
->
drawing_state
.
tag2
=
tag2
;
}
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_GetTags
(
ID2D1RenderTarget
*
iface
,
D2D1_TAG
*
tag1
,
D2D1_TAG
*
tag2
)
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_GetTags
(
ID2D1RenderTarget
*
iface
,
D2D1_TAG
*
tag1
,
D2D1_TAG
*
tag2
)
...
@@ -908,8 +908,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_GetTags(ID2D1RenderTarget *i
...
@@ -908,8 +908,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_GetTags(ID2D1RenderTarget *i
TRACE
(
"iface %p, tag1 %p, tag2 %p.
\n
"
,
iface
,
tag1
,
tag2
);
TRACE
(
"iface %p, tag1 %p, tag2 %p.
\n
"
,
iface
,
tag1
,
tag2
);
*
tag1
=
render_target
->
tag1
;
*
tag1
=
render_target
->
drawing_state
.
tag1
;
*
tag2
=
render_target
->
tag2
;
*
tag2
=
render_target
->
drawing_state
.
tag2
;
}
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_PushLayer
(
ID2D1RenderTarget
*
iface
,
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_PushLayer
(
ID2D1RenderTarget
*
iface
,
...
@@ -957,13 +957,17 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_PushAxisAlignedClip(ID2D1Ren
...
@@ -957,13 +957,17 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_PushAxisAlignedClip(ID2D1Ren
x_scale
=
render_target
->
dpi_x
/
96
.
0
f
;
x_scale
=
render_target
->
dpi_x
/
96
.
0
f
;
y_scale
=
render_target
->
dpi_y
/
96
.
0
f
;
y_scale
=
render_target
->
dpi_y
/
96
.
0
f
;
d2d_point_transform
(
&
point
,
&
render_target
->
transform
,
clip_rect
->
left
*
x_scale
,
clip_rect
->
top
*
y_scale
);
d2d_point_transform
(
&
point
,
&
render_target
->
drawing_state
.
transform
,
clip_rect
->
left
*
x_scale
,
clip_rect
->
top
*
y_scale
);
d2d_rect_set
(
&
transformed_rect
,
point
.
x
,
point
.
y
,
point
.
x
,
point
.
y
);
d2d_rect_set
(
&
transformed_rect
,
point
.
x
,
point
.
y
,
point
.
x
,
point
.
y
);
d2d_point_transform
(
&
point
,
&
render_target
->
transform
,
clip_rect
->
left
*
x_scale
,
clip_rect
->
bottom
*
y_scale
);
d2d_point_transform
(
&
point
,
&
render_target
->
drawing_state
.
transform
,
clip_rect
->
left
*
x_scale
,
clip_rect
->
bottom
*
y_scale
);
d2d_rect_expand
(
&
transformed_rect
,
&
point
);
d2d_rect_expand
(
&
transformed_rect
,
&
point
);
d2d_point_transform
(
&
point
,
&
render_target
->
transform
,
clip_rect
->
right
*
x_scale
,
clip_rect
->
top
*
y_scale
);
d2d_point_transform
(
&
point
,
&
render_target
->
drawing_state
.
transform
,
clip_rect
->
right
*
x_scale
,
clip_rect
->
top
*
y_scale
);
d2d_rect_expand
(
&
transformed_rect
,
&
point
);
d2d_rect_expand
(
&
transformed_rect
,
&
point
);
d2d_point_transform
(
&
point
,
&
render_target
->
transform
,
clip_rect
->
right
*
x_scale
,
clip_rect
->
bottom
*
y_scale
);
d2d_point_transform
(
&
point
,
&
render_target
->
drawing_state
.
transform
,
clip_rect
->
right
*
x_scale
,
clip_rect
->
bottom
*
y_scale
);
d2d_rect_expand
(
&
transformed_rect
,
&
point
);
d2d_rect_expand
(
&
transformed_rect
,
&
point
);
if
(
!
d2d_clip_stack_push
(
&
render_target
->
clip_stack
,
&
transformed_rect
))
if
(
!
d2d_clip_stack_push
(
&
render_target
->
clip_stack
,
&
transformed_rect
))
...
@@ -1519,7 +1523,7 @@ HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target,
...
@@ -1519,7 +1523,7 @@ HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target,
render_target
->
pixel_size
.
width
=
surface_desc
.
Width
;
render_target
->
pixel_size
.
width
=
surface_desc
.
Width
;
render_target
->
pixel_size
.
height
=
surface_desc
.
Height
;
render_target
->
pixel_size
.
height
=
surface_desc
.
Height
;
render_target
->
transform
=
identity
;
render_target
->
drawing_state
.
transform
=
identity
;
if
(
!
d2d_clip_stack_init
(
&
render_target
->
clip_stack
))
if
(
!
d2d_clip_stack_init
(
&
render_target
->
clip_stack
))
{
{
...
...
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