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
57f84bc7
Commit
57f84bc7
authored
Dec 20, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid duplicate computation of text extents in ExtTextOut.
parent
0da8c0d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
34 deletions
+9
-34
font.c
dlls/gdi32/font.c
+9
-34
No files found.
dlls/gdi32/font.c
View file @
57f84bc7
...
...
@@ -2097,7 +2097,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
INT
char_extra
;
SIZE
sz
;
RECT
rc
;
BOOL
done_extents
=
FALSE
;
POINT
*
deltas
=
NULL
,
width
=
{
0
,
0
};
DWORD
type
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
...
...
@@ -2125,9 +2124,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
return
ret
;
}
if
(
!
lprect
)
flags
&=
~
ETO_CLIPPED
;
if
(
flags
&
ETO_RTLREADING
)
align
|=
TA_RTLREADING
;
if
(
layout
&
LAYOUT_RTL
)
{
...
...
@@ -2189,32 +2185,15 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
sinEsc
=
0
;
}
if
(
flags
&
(
ETO_CLIPPED
|
ETO_OPAQUE
)
)
if
(
lprect
)
{
if
(
!
lprect
)
{
if
(
flags
&
ETO_GLYPH_INDEX
)
GetTextExtentPointI
(
hdc
,
glyphs
,
count
,
&
sz
);
else
GetTextExtentPointW
(
hdc
,
reordered_str
,
count
,
&
sz
);
done_extents
=
TRUE
;
rc
.
left
=
x
;
rc
.
top
=
y
;
rc
.
right
=
x
+
sz
.
cx
;
rc
.
bottom
=
y
+
sz
.
cy
;
}
else
{
rc
=
*
lprect
;
}
rc
=
*
lprect
;
LPtoDP
(
hdc
,
(
POINT
*
)
&
rc
,
2
);
order_rect
(
&
rc
);
if
(
flags
&
ETO_OPAQUE
)
physdev
->
funcs
->
pExtTextOut
(
physdev
,
0
,
0
,
ETO_OPAQUE
,
&
rc
,
NULL
,
0
,
NULL
);
}
if
(
lprect
&&
(
flags
&
ETO_OPAQUE
))
physdev
->
funcs
->
pExtTextOut
(
physdev
,
0
,
0
,
ETO_OPAQUE
,
&
rc
,
NULL
,
0
,
NULL
);
else
flags
&=
~
ETO_CLIPPED
;
if
(
count
==
0
)
{
...
...
@@ -2306,14 +2285,10 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
{
POINT
desired
[
2
];
if
(
!
done_extents
)
{
if
(
flags
&
ETO_GLYPH_INDEX
)
GetTextExtentPointI
(
hdc
,
glyphs
,
count
,
&
sz
);
else
GetTextExtentPointW
(
hdc
,
reordered_str
,
count
,
&
sz
);
done_extents
=
TRUE
;
}
if
(
flags
&
ETO_GLYPH_INDEX
)
GetTextExtentPointI
(
hdc
,
glyphs
,
count
,
&
sz
);
else
GetTextExtentPointW
(
hdc
,
reordered_str
,
count
,
&
sz
);
desired
[
0
].
x
=
desired
[
0
].
y
=
0
;
desired
[
1
].
x
=
sz
.
cx
;
desired
[
1
].
y
=
0
;
...
...
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