Skip to content

Commit

Permalink
[content handler] move to MX_EVENT_SIGNALED for fences (flutter#3912)
Browse files Browse the repository at this point in the history
  • Loading branch information
freiling authored Jul 21, 2017
1 parent aeaefba commit b48d98e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content_handler/vulkan_surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ VulkanSurface::VulkanSurface(vulkan::VulkanProcTable& p_vk,
}

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
// already.
Expand Down Expand Up @@ -302,7 +302,7 @@ void VulkanSurface::SignalWritesFinished(
"has not yet been acknowledged by 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();
return;
}
Expand All @@ -313,8 +313,8 @@ void VulkanSurface::SignalWritesFinished(
void VulkanSurface::Reset() {
ASSERT_IS_GPU_THREAD;

if (acquire_event_.signal(MX_USER_SIGNAL_0, 0u) != MX_OK ||
release_event_.signal(MX_USER_SIGNAL_0, 0u) != MX_OK) {
if (acquire_event_.signal(MX_EVENT_SIGNALED, 0u) != MX_OK ||
release_event_.signal(MX_EVENT_SIGNALED, 0u) != MX_OK) {
valid_ = false;
FTL_DLOG(ERROR)
<< "Could not reset fences. The surface is no longer valid.";
Expand All @@ -332,7 +332,7 @@ void VulkanSurface::OnHandleReady(mx_handle_t handle,
mx_signals_t pending,
uint64_t count) {
ASSERT_IS_GPU_THREAD;
FTL_DCHECK(pending & MX_USER_SIGNAL_0);
FTL_DCHECK(pending & MX_EVENT_SIGNALED);
FTL_DCHECK(handle == release_event_.get());
Reset();
}
Expand Down

0 comments on commit b48d98e

Please sign in to comment.