Example #1
0
void
VsyncBridgeChild::NotifyVsync(TimeStamp aTimeStamp, const layers::LayersId& aLayersId)
{
  // This should be on the Vsync thread (not the Vsync I/O thread).
  MOZ_ASSERT(!IsOnVsyncIOThread());

  RefPtr<NotifyVsyncTask> task = new NotifyVsyncTask(this, aTimeStamp, aLayersId);
  mLoop->PostTask(task.forget());
}
Example #2
0
void
VsyncBridgeChild::NotifyVsyncImpl(TimeStamp aTimeStamp, const layers::LayersId& aLayersId)
{
  // This should be on the Vsync I/O thread.
  MOZ_ASSERT(IsOnVsyncIOThread());

  if (!mProcessToken) {
    return;
  }
  SendNotifyVsync(aTimeStamp, aLayersId);
}
void
VsyncBridgeChild::Close()
{
  if (!IsOnVsyncIOThread()) {
    mLoop->PostTask(NewRunnableMethod(this, &VsyncBridgeChild::Close));
    return;
  }

  // We clear mProcessToken when the channel is closed.
  if (!mProcessToken) {
    return;
  }
  PVsyncBridgeChild::Close();
  mProcessToken = 0;
}
Example #4
0
void
VsyncBridgeChild::Close()
{
  if (!IsOnVsyncIOThread()) {
    mLoop->PostTask(NewRunnableMethod(
      "gfx::VsyncBridgeChild::Close", this, &VsyncBridgeChild::Close));
    return;
  }

  // We clear mProcessToken when the channel is closed.
  if (!mProcessToken) {
    return;
  }

  // Clear the process token so we don't notify the GPUProcessManager. It already
  // knows we're closed since it manually called Close, and in fact the GPM could
  // have already been destroyed during shutdown.
  mProcessToken = 0;

  // Close the underlying IPC channel.
  PVsyncBridgeChild::Close();
}