浏览代码

fix editor window issue

unknown crash caused by multithread when resizing the window too frequently
/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
ab353519
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 5
      engine/src/shell/platform/unity/windows/uiwidgets_panel.cc

5
engine/src/shell/platform/unity/windows/uiwidgets_panel.cc


void UIWidgetsPanel::OnRenderTexture(void* native_texture_ptr, size_t width,
size_t height, float device_pixel_ratio) {
fml::AutoResetWaitableEvent latch;
[this, native_texture_ptr]() -> void {
[&latch, this, native_texture_ptr]() -> void {
surface_manager_->MakeCurrent(EGL_NO_DISPLAY);
if (fbo_) {

fbo_ = surface_manager_->CreateRenderSurface(native_texture_ptr);
surface_manager_->ClearCurrent();
latch.Signal();
latch.Wait();
ViewportMetrics metrics;
metrics.physical_width = static_cast<float>(width);

正在加载...
取消
保存