浏览代码

fix occasional crash on mac

/siyaoH-1.17-PlatformMessage
Xingwei Zhu 4 年前
当前提交
19d1bf29
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 5
      com.unity.uiwidgets/Runtime/foundation/debug.cs
  2. 3
      engine/src/shell/platform/unity/darwin/macos/unity_surface_manager.mm

5
com.unity.uiwidgets/Runtime/foundation/debug.cs


public static bool debugCheckIntrinsicSizes = false;
public static bool debugPrintMouseHoverEvents = false;
static bool debugEnableAtRuntimeInternal = false;
public static HSVColor debugCurrentRepaintColor =
HSVColor.fromAHSV(0.4f, 60.0f, 1.0f, 1.0f);

}
}
#else
private const bool internalEnableDebugAtRuntime = false;
public static bool enableDebug => internalEnableDebugAtRuntime;
public static bool enableDebug => debugEnableAtRuntimeInternal;
#endif
public static void _debugDrawDoubleRect(Canvas canvas, Rect outerRect, Rect innerRect, Color color) {

3
engine/src/shell/platform/unity/darwin/macos/unity_surface_manager.mm


default_fbo_ = 0;
FML_DCHECK(gl_tex_ != 0);
glDeleteTextures(1, &gl_tex_);
//gl_tex_ will be released in CVOpenGLTextureRelease
//glDeleteTextures(1, &gl_tex_);
gl_tex_ = 0;
CVOpenGLTextureCacheRelease(gl_tex_cache_ref_);

正在加载...
取消
保存