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
72ebbb61
Commit
72ebbb61
authored
Jun 15, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Jun 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allocate a glyphset until we actually need it.
parent
f435914b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
34 deletions
+47
-34
xrender.c
dlls/x11drv/xrender.c
+47
-34
No files found.
dlls/x11drv/xrender.c
View file @
72ebbb61
...
...
@@ -364,7 +364,6 @@ static int AllocEntry(void)
static
int
GetCacheEntry
(
LFANDSIZE
*
plfsz
)
{
XRenderPictFormat
pf
;
int
ret
;
gsCacheEntry
*
entry
;
...
...
@@ -380,35 +379,8 @@ static int GetCacheEntry(LFANDSIZE *plfsz)
else
entry
->
aa
=
AA_None
;
if
(
X11DRV_XRender_Installed
)
{
switch
(
entry
->
aa
)
{
case
AA_Grey
:
pf
.
depth
=
8
;
pf
.
direct
.
alphaMask
=
0xff
;
break
;
default:
ERR
(
"aa = %d - not implemented
\n
"
,
entry
->
aa
);
case
AA_None
:
pf
.
depth
=
1
;
pf
.
direct
.
alphaMask
=
1
;
break
;
}
pf
.
type
=
PictTypeDirect
;
pf
.
direct
.
alpha
=
0
;
wine_tsx11_lock
();
entry
->
font_format
=
pXRenderFindFormat
(
gdi_display
,
PictFormatType
|
PictFormatDepth
|
PictFormatAlpha
|
PictFormatAlphaMask
,
&
pf
,
0
);
entry
->
glyphset
=
pXRenderCreateGlyphSet
(
gdi_display
,
entry
->
font_format
);
wine_tsx11_unlock
();
}
entry
->
font_format
=
NULL
;
entry
->
glyphset
=
0
;
return
ret
;
}
...
...
@@ -544,6 +516,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph)
XGlyphInfo
gi
;
gsCacheEntry
*
entry
=
glyphsetCache
+
physDev
->
xrender
->
cache_index
;
UINT
ggo_format
=
GGO_GLYPH_INDEX
;
XRenderPictFormat
pf
;
if
(
entry
->
nrealized
<=
glyph
)
{
entry
->
nrealized
=
(
glyph
/
128
+
1
)
*
128
;
...
...
@@ -558,7 +531,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph)
HEAP_ZERO_MEMORY
,
entry
->
nrealized
*
sizeof
(
BOOL
));
if
(
entry
->
glyphset
==
0
)
{
if
(
!
X11DRV_XRender_Installed
)
{
if
(
entry
->
bitmaps
)
entry
->
bitmaps
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
...
...
@@ -596,14 +569,54 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph)
buflen
=
GetGlyphOutlineW
(
physDev
->
hdc
,
glyph
,
ggo_format
,
&
gm
,
0
,
NULL
,
NULL
);
if
(
buflen
==
GDI_ERROR
)
{
LeaveCriticalSection
(
&
xrender_cs
);
return
FALSE
;
if
(
entry
->
aa
!=
AA_None
)
{
entry
->
aa
=
AA_None
;
ggo_format
&=
~
WINE_GGO_GRAY16_BITMAP
;
ggo_format
|=
GGO_BITMAP
;
buflen
=
GetGlyphOutlineW
(
physDev
->
hdc
,
glyph
,
ggo_format
,
&
gm
,
0
,
NULL
,
NULL
);
}
if
(
buflen
==
GDI_ERROR
)
{
LeaveCriticalSection
(
&
xrender_cs
);
return
FALSE
;
}
TRACE
(
"Turning off antialiasing for this monochrome font
\n
"
);
}
if
(
entry
->
glyphset
==
0
&&
X11DRV_XRender_Installed
)
{
switch
(
entry
->
aa
)
{
case
AA_Grey
:
pf
.
depth
=
8
;
pf
.
direct
.
alphaMask
=
0xff
;
break
;
default:
ERR
(
"aa = %d - not implemented
\n
"
,
entry
->
aa
);
case
AA_None
:
pf
.
depth
=
1
;
pf
.
direct
.
alphaMask
=
1
;
break
;
}
pf
.
type
=
PictTypeDirect
;
pf
.
direct
.
alpha
=
0
;
wine_tsx11_lock
();
entry
->
font_format
=
pXRenderFindFormat
(
gdi_display
,
PictFormatType
|
PictFormatDepth
|
PictFormatAlpha
|
PictFormatAlphaMask
,
&
pf
,
0
);
entry
->
glyphset
=
pXRenderCreateGlyphSet
(
gdi_display
,
entry
->
font_format
);
wine_tsx11_unlock
();
}
entry
->
realized
[
glyph
]
=
TRUE
;
buf
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
buflen
);
GetGlyphOutlineW
(
physDev
->
hdc
,
glyph
,
ggo_format
,
&
gm
,
buflen
,
buf
,
NULL
);
entry
->
realized
[
glyph
]
=
TRUE
;
TRACE
(
"buflen = %d. Got metrics: %dx%d adv=%d,%d origin=%ld,%ld
\n
"
,
buflen
,
...
...
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