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
e35e0f2b
Commit
e35e0f2b
authored
Feb 03, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix rendering mode enum conversion warnings.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9c238307
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
main.c
dlls/dwrite/main.c
+25
-12
No files found.
dlls/dwrite/main.c
View file @
e35e0f2b
...
...
@@ -141,16 +141,29 @@ static DWRITE_PIXEL_GEOMETRY WINAPI renderingparams_GetPixelGeometry(IDWriteRend
return
This
->
geometry
;
}
static
DWRITE_RENDERING_MODE
rendering_mode_from_mode1
(
DWRITE_RENDERING_MODE1
mode
)
{
static
const
DWRITE_RENDERING_MODE
rendering_modes
[]
=
{
DWRITE_RENDERING_MODE_DEFAULT
,
/* DWRITE_RENDERING_MODE1_DEFAULT */
DWRITE_RENDERING_MODE_ALIASED
,
/* DWRITE_RENDERING_MODE1_ALIASED */
DWRITE_RENDERING_MODE_GDI_CLASSIC
,
/* DWRITE_RENDERING_MODE1_GDI_CLASSIC */
DWRITE_RENDERING_MODE_GDI_NATURAL
,
/* DWRITE_RENDERING_MODE1_GDI_NATURAL */
DWRITE_RENDERING_MODE_NATURAL
,
/* DWRITE_RENDERING_MODE1_NATURAL */
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
,
/* DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC */
DWRITE_RENDERING_MODE_OUTLINE
,
/* DWRITE_RENDERING_MODE1_OUTLINE */
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
,
/* DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED */
};
return
rendering_modes
[
mode
];
}
static
DWRITE_RENDERING_MODE
WINAPI
renderingparams_GetRenderingMode
(
IDWriteRenderingParams3
*
iface
)
{
struct
renderingparams
*
This
=
impl_from_IDWriteRenderingParams3
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
mode
==
DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
)
return
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
;
return
This
->
mode
;
return
rendering_mode_from_mode1
(
This
->
mode
);
}
static
FLOAT
WINAPI
renderingparams1_GetGrayscaleEnhancedContrast
(
IDWriteRenderingParams3
*
iface
)
...
...
@@ -189,7 +202,7 @@ static const struct IDWriteRenderingParams3Vtbl renderingparamsvtbl = {
};
static
HRESULT
create_renderingparams
(
FLOAT
gamma
,
FLOAT
contrast
,
FLOAT
grayscalecontrast
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
mode
,
DWRITE_GRID_FIT_MODE
gridfit
,
IDWriteRenderingParams3
**
params
)
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
1
mode
,
DWRITE_GRID_FIT_MODE
gridfit
,
IDWriteRenderingParams3
**
params
)
{
struct
renderingparams
*
This
;
...
...
@@ -966,8 +979,8 @@ static HRESULT WINAPI dwritefactory_CreateMonitorRenderingParams(IDWriteFactory4
if
(
!
fixme_once
++
)
FIXME
(
"(%p): monitor setting ignored
\n
"
,
monitor
);
hr
=
IDWriteFactory4_CreateCustomRenderingParams
(
iface
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
DWRITE_PIXEL_GEOMETRY_FLAT
,
DWRITE_RENDERING_MODE_DEFAULT
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
hr
=
IDWriteFactory4_CreateCustomRenderingParams
(
iface
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
DWRITE_PIXEL_GEOMETRY_FLAT
,
DWRITE_
RENDERING_MODE1_DEFAULT
,
DWRITE_
GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams
*
)
params3
;
return
hr
;
}
...
...
@@ -982,7 +995,7 @@ static HRESULT WINAPI dwritefactory_CreateCustomRenderingParams(IDWriteFactory4
TRACE
(
"(%p)->(%f %f %f %d %d %p)
\n
"
,
This
,
gamma
,
enhancedContrast
,
cleartype_level
,
geometry
,
mode
,
params
);
hr
=
IDWriteFactory4_CreateCustomRenderingParams
(
iface
,
gamma
,
enhancedContrast
,
1
.
0
f
,
cleartype_level
,
geometry
,
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
(
DWRITE_RENDERING_MODE1
)
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams
*
)
params3
;
return
hr
;
}
...
...
@@ -1162,7 +1175,7 @@ static HRESULT WINAPI dwritefactory_CreateGlyphRunAnalysis(IDWriteFactory4 *ifac
desc
.
run
=
run
;
desc
.
ppdip
=
ppdip
;
desc
.
transform
=
transform
;
desc
.
rendering_mode
=
rendering_mode
;
desc
.
rendering_mode
=
(
DWRITE_RENDERING_MODE1
)
rendering_mode
;
desc
.
measuring_mode
=
measuring_mode
;
desc
.
gridfit_mode
=
DWRITE_GRID_FIT_MODE_DEFAULT
;
desc
.
aa_mode
=
DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE
;
...
...
@@ -1204,7 +1217,7 @@ static HRESULT WINAPI dwritefactory1_CreateCustomRenderingParams(IDWriteFactory4
TRACE
(
"(%p)->(%.2f %.2f %.2f %.2f %d %d %p)
\n
"
,
This
,
gamma
,
enhcontrast
,
enhcontrast_grayscale
,
cleartype_level
,
geometry
,
mode
,
params
);
hr
=
IDWriteFactory4_CreateCustomRenderingParams
(
iface
,
gamma
,
enhcontrast
,
enhcontrast_grayscale
,
cleartype_level
,
geometry
,
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
cleartype_level
,
geometry
,
(
DWRITE_RENDERING_MODE1
)
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams1
*
)
params3
;
return
hr
;
}
...
...
@@ -1257,7 +1270,7 @@ static HRESULT WINAPI dwritefactory2_CreateCustomRenderingParams(IDWriteFactory4
geometry
,
mode
,
gridfit
,
params
);
hr
=
IDWriteFactory4_CreateCustomRenderingParams
(
iface
,
gamma
,
contrast
,
grayscalecontrast
,
cleartype_level
,
geometry
,
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
cleartype_level
,
geometry
,
(
DWRITE_RENDERING_MODE1
)
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams2
*
)
params3
;
return
hr
;
}
...
...
@@ -1276,7 +1289,7 @@ static HRESULT WINAPI dwritefactory2_CreateGlyphRunAnalysis(IDWriteFactory4 *ifa
desc
.
run
=
run
;
desc
.
ppdip
=
1
.
0
f
;
desc
.
transform
=
transform
;
desc
.
rendering_mode
=
rendering_mode
;
desc
.
rendering_mode
=
(
DWRITE_RENDERING_MODE1
)
rendering_mode
;
desc
.
measuring_mode
=
measuring_mode
;
desc
.
gridfit_mode
=
gridfit_mode
;
desc
.
aa_mode
=
aa_mode
;
...
...
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