提交 b48d98e0 编写于 作者: F freiling 提交者: GitHub

[content handler] move to MX_EVENT_SIGNALED for fences (#3912)

上级 aeaefbad
...@@ -39,7 +39,7 @@ VulkanSurface::VulkanSurface(vulkan::VulkanProcTable& p_vk, ...@@ -39,7 +39,7 @@ VulkanSurface::VulkanSurface(vulkan::VulkanProcTable& p_vk,
} }
event_handler_key_ = mtl::MessageLoop::GetCurrent()->AddHandler( event_handler_key_ = mtl::MessageLoop::GetCurrent()->AddHandler(
this, release_event_.get(), MX_USER_SIGNAL_0); this, release_event_.get(), MX_EVENT_SIGNALED);
// Probably not necessary as the events should be in the unsignalled state // Probably not necessary as the events should be in the unsignalled state
// already. // already.
...@@ -302,7 +302,7 @@ void VulkanSurface::SignalWritesFinished( ...@@ -302,7 +302,7 @@ void VulkanSurface::SignalWritesFinished(
"has not yet been acknowledged by the compositor."; "has not yet been acknowledged by the compositor.";
// Signal the acquire end to the compositor. // Signal the acquire end to the compositor.
if (acquire_event_.signal(0u, MX_USER_SIGNAL_0) != MX_OK) { if (acquire_event_.signal(0u, MX_EVENT_SIGNALED) != MX_OK) {
on_writes_committed(); on_writes_committed();
return; return;
} }
...@@ -313,8 +313,8 @@ void VulkanSurface::SignalWritesFinished( ...@@ -313,8 +313,8 @@ void VulkanSurface::SignalWritesFinished(
void VulkanSurface::Reset() { void VulkanSurface::Reset() {
ASSERT_IS_GPU_THREAD; ASSERT_IS_GPU_THREAD;
if (acquire_event_.signal(MX_USER_SIGNAL_0, 0u) != MX_OK || if (acquire_event_.signal(MX_EVENT_SIGNALED, 0u) != MX_OK ||
release_event_.signal(MX_USER_SIGNAL_0, 0u) != MX_OK) { release_event_.signal(MX_EVENT_SIGNALED, 0u) != MX_OK) {
valid_ = false; valid_ = false;
FTL_DLOG(ERROR) FTL_DLOG(ERROR)
<< "Could not reset fences. The surface is no longer valid."; << "Could not reset fences. The surface is no longer valid.";
...@@ -332,7 +332,7 @@ void VulkanSurface::OnHandleReady(mx_handle_t handle, ...@@ -332,7 +332,7 @@ void VulkanSurface::OnHandleReady(mx_handle_t handle,
mx_signals_t pending, mx_signals_t pending,
uint64_t count) { uint64_t count) {
ASSERT_IS_GPU_THREAD; ASSERT_IS_GPU_THREAD;
FTL_DCHECK(pending & MX_USER_SIGNAL_0); FTL_DCHECK(pending & MX_EVENT_SIGNALED);
FTL_DCHECK(handle == release_event_.get()); FTL_DCHECK(handle == release_event_.get());
Reset(); Reset();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册