Commit 613bed53 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

opengl32: Use msvcrt allocation functions.

parent 60eeb92a
...@@ -429,10 +429,10 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l ...@@ -429,10 +429,10 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l
if (needed_size > size) { if (needed_size > size) {
size = needed_size; size = needed_size;
HeapFree(GetProcessHeap(), 0, bitmap); free( bitmap );
HeapFree(GetProcessHeap(), 0, gl_bitmap); free( gl_bitmap );
bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); bitmap = calloc( 1, size );
gl_bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); gl_bitmap = calloc( 1, size );
} }
if (needed_size != 0) { if (needed_size != 0) {
if (unicode) if (unicode)
...@@ -496,8 +496,8 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l ...@@ -496,8 +496,8 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l
} }
glPixelStorei( GL_UNPACK_ALIGNMENT, org_alignment ); glPixelStorei( GL_UNPACK_ALIGNMENT, org_alignment );
HeapFree(GetProcessHeap(), 0, bitmap); free( bitmap );
HeapFree(GetProcessHeap(), 0, gl_bitmap); free( gl_bitmap );
return ret; return ret;
} }
...@@ -658,7 +658,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc, ...@@ -658,7 +658,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
if(needed == GDI_ERROR) if(needed == GDI_ERROR)
goto error; goto error;
buf = HeapAlloc(GetProcessHeap(), 0, needed); buf = malloc( needed );
if(unicode) if(unicode)
GetGlyphOutlineW(hdc, glyph, GGO_NATIVE, &gm, needed, buf, &identity); GetGlyphOutlineW(hdc, glyph, GGO_NATIVE, &gm, needed, buf, &identity);
...@@ -692,8 +692,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc, ...@@ -692,8 +692,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
while(!vertices) while(!vertices)
{ {
if(vertex_total != -1) if (vertex_total != -1) vertices = malloc( vertex_total * 3 * sizeof(GLdouble) );
vertices = HeapAlloc(GetProcessHeap(), 0, vertex_total * 3 * sizeof(GLdouble));
vertex_total = 0; vertex_total = 0;
pph = (TTPOLYGONHEADER*)buf; pph = (TTPOLYGONHEADER*)buf;
...@@ -767,7 +766,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc, ...@@ -767,7 +766,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
curve[2].y = (curve[1].y + curve[2].y)/2; curve[2].y = (curve[1].y + curve[2].y)/2;
} }
num = bezier_approximate(curve, NULL, deviation); 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); num = bezier_approximate(curve, points, deviation);
vertex_total += num; vertex_total += num;
if(vertices) if(vertices)
...@@ -783,7 +782,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc, ...@@ -783,7 +782,7 @@ static BOOL wglUseFontOutlines_common(HDC hdc,
vertices += 3; vertices += 3;
} }
} }
HeapFree(GetProcessHeap(), 0, points); free( points );
previous[0] = curve[2].x; previous[0] = curve[2].x;
previous[1] = curve[2].y; previous[1] = curve[2].y;
} }
...@@ -808,8 +807,8 @@ error_in_list: ...@@ -808,8 +807,8 @@ error_in_list:
if (format == WGL_FONT_POLYGONS) gluTessEndPolygon( tess ); if (format == WGL_FONT_POLYGONS) gluTessEndPolygon( tess );
glTranslated( (GLdouble)gm.gmCellIncX / em_size, (GLdouble)gm.gmCellIncY / em_size, 0.0 ); glTranslated( (GLdouble)gm.gmCellIncX / em_size, (GLdouble)gm.gmCellIncY / em_size, 0.0 );
glEndList(); glEndList();
HeapFree(GetProcessHeap(), 0, buf); free( buf );
HeapFree(GetProcessHeap(), 0, vertices); free( vertices );
} }
error: error:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment