浏览代码

Use bzalloc instead of bmalloc+memset

Palana 11 年之前
父节点
当前提交
c2abb80c9a
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      libobs-opengl/gl-cocoa.m

+ 1 - 2
libobs-opengl/gl-cocoa.m

@@ -217,8 +217,7 @@ void gl_getclientsize(struct gs_swap_chain *swap, uint32_t *width,
 texture_t texture_create_from_iosurface(device_t device, void *iosurf)
 texture_t texture_create_from_iosurface(device_t device, void *iosurf)
 {
 {
 	IOSurfaceRef ref = (IOSurfaceRef)iosurf;
 	IOSurfaceRef ref = (IOSurfaceRef)iosurf;
-	struct gs_texture_2d *tex = bmalloc(sizeof(struct gs_texture_2d));
-	memset(tex, 0, sizeof(struct gs_texture_2d));
+	struct gs_texture_2d *tex = bzalloc(sizeof(struct gs_texture_2d));
 
 
 	OSType pf = IOSurfaceGetPixelFormat(ref);
 	OSType pf = IOSurfaceGetPixelFormat(ref);
 	if (pf != 'BGRA')
 	if (pf != 'BGRA')