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
613bed53
Commit
613bed53
authored
Oct 06, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Use msvcrt allocation functions.
parent
60eeb92a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
wgl.c
dlls/opengl32/wgl.c
+12
-13
No files found.
dlls/opengl32/wgl.c
View file @
613bed53
...
...
@@ -429,10 +429,10 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l
if
(
needed_size
>
size
)
{
size
=
needed_size
;
HeapFree
(
GetProcessHeap
(),
0
,
bitmap
);
HeapFree
(
GetProcessHeap
(),
0
,
gl_bitmap
);
bitmap
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
gl_bitmap
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
free
(
bitmap
);
free
(
gl_bitmap
);
bitmap
=
calloc
(
1
,
size
);
gl_bitmap
=
calloc
(
1
,
size
);
}
if
(
needed_size
!=
0
)
{
if
(
unicode
)
...
...
@@ -496,8 +496,8 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l
}
glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
org_alignment
);
HeapFree
(
GetProcessHeap
(),
0
,
bitmap
);
HeapFree
(
GetProcessHeap
(),
0
,
gl_bitmap
);
free
(
bitmap
);
free
(
gl_bitmap
);
return
ret
;
}
...
...
@@ -658,7 +658,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
if
(
needed
==
GDI_ERROR
)
goto
error
;
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
buf
=
malloc
(
needed
);
if
(
unicode
)
GetGlyphOutlineW
(
hdc
,
glyph
,
GGO_NATIVE
,
&
gm
,
needed
,
buf
,
&
identity
);
...
...
@@ -692,8 +692,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
while
(
!
vertices
)
{
if
(
vertex_total
!=
-
1
)
vertices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
vertex_total
*
3
*
sizeof
(
GLdouble
));
if
(
vertex_total
!=
-
1
)
vertices
=
malloc
(
vertex_total
*
3
*
sizeof
(
GLdouble
)
);
vertex_total
=
0
;
pph
=
(
TTPOLYGONHEADER
*
)
buf
;
...
...
@@ -767,7 +766,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
curve
[
2
].
y
=
(
curve
[
1
].
y
+
curve
[
2
].
y
)
/
2
;
}
num
=
bezier_approximate
(
curve
,
NULL
,
deviation
);
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
num
*
sizeof
(
bezier_vector
)
);
points
=
malloc
(
num
*
sizeof
(
bezier_vector
)
);
num
=
bezier_approximate
(
curve
,
points
,
deviation
);
vertex_total
+=
num
;
if
(
vertices
)
...
...
@@ -783,7 +782,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
vertices
+=
3
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
points
);
free
(
points
);
previous
[
0
]
=
curve
[
2
].
x
;
previous
[
1
]
=
curve
[
2
].
y
;
}
...
...
@@ -808,8 +807,8 @@ error_in_list:
if
(
format
==
WGL_FONT_POLYGONS
)
gluTessEndPolygon
(
tess
);
glTranslated
(
(
GLdouble
)
gm
.
gmCellIncX
/
em_size
,
(
GLdouble
)
gm
.
gmCellIncY
/
em_size
,
0
.
0
);
glEndList
();
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
vertices
);
free
(
buf
);
free
(
vertices
);
}
error:
...
...
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