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
3e5e0ee8
Commit
3e5e0ee8
authored
Oct 06, 2009
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move XRENDERINFO allocation in a separate function.
parent
50705c56
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
xrender.c
dlls/winex11.drv/xrender.c
+24
-8
No files found.
dlls/winex11.drv/xrender.c
View file @
3e5e0ee8
...
...
@@ -207,6 +207,23 @@ static CRITICAL_SECTION xrender_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
#define NATIVE_BYTE_ORDER LSBFirst
#endif
static
XRENDERINFO
get_xrender_info
(
X11DRV_PDEVICE
*
physDev
)
{
if
(
!
physDev
->
xrender
)
{
physDev
->
xrender
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
tagXRENDERINFO
));
if
(
!
physDev
->
xrender
)
{
ERR
(
"Unable to allocate XRENDERINFO!
\n
"
);
return
NULL
;
}
physDev
->
xrender
->
cache_index
=
-
1
;
}
return
physDev
->
xrender
;
}
static
BOOL
get_xrender_template
(
const
WineXRenderFormatTemplate
*
fmt
,
XRenderPictFormat
*
templ
,
unsigned
long
*
mask
)
{
templ
->
id
=
0
;
...
...
@@ -795,6 +812,7 @@ void X11DRV_XRender_Finalize(void)
BOOL
X11DRV_XRender_SelectFont
(
X11DRV_PDEVICE
*
physDev
,
HFONT
hfont
)
{
LFANDSIZE
lfsz
;
XRENDERINFO
info
;
GetObjectW
(
hfont
,
sizeof
(
lfsz
.
lf
),
&
lfsz
.
lf
);
TRACE
(
"h=%d w=%d weight=%d it=%d charset=%d name=%s
\n
"
,
...
...
@@ -806,15 +824,13 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont)
GetWorldTransform
(
physDev
->
hdc
,
&
lfsz
.
xform
);
lfsz_calc_hash
(
&
lfsz
);
info
=
get_xrender_info
(
physDev
);
if
(
!
info
)
return
0
;
EnterCriticalSection
(
&
xrender_cs
);
if
(
!
physDev
->
xrender
)
{
physDev
->
xrender
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
physDev
->
xrender
));
physDev
->
xrender
->
cache_index
=
-
1
;
}
else
if
(
physDev
->
xrender
->
cache_index
!=
-
1
)
dec_ref_cache
(
physDev
->
xrender
->
cache_index
);
physDev
->
xrender
->
cache_index
=
GetCacheEntry
(
physDev
,
&
lfsz
);
if
(
info
->
cache_index
!=
-
1
)
dec_ref_cache
(
info
->
cache_index
);
info
->
cache_index
=
GetCacheEntry
(
physDev
,
&
lfsz
);
LeaveCriticalSection
(
&
xrender_cs
);
return
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