示例#1
0
文件: tools.cpp 项目: jkozdon/occa
    void signalExit(int sig) {
      if ((sig == SIGTERM) ||
          (sig == SIGKILL) ||
          (sig == SIGINT ) ||
          (sig == SIGQUIT)) {

        clearLocks();
        ::exit(sig);
      }
    }
void
WebRenderBridgeParent::HandleDPEnd(const gfx::IntSize& aSize,
                                 InfallibleTArray<WebRenderParentCommand>&& aCommands,
                                 InfallibleTArray<OpDestroy>&& aToDestroy,
                                 const uint64_t& aFwdTransactionId,
                                 const uint64_t& aTransactionId,
                                 const wr::LayoutSize& aContentSize,
                                 const wr::ByteBuffer& dl,
                                 const wr::BuiltDisplayListDescriptor& dlDesc,
                                 const WebRenderScrollData& aScrollData,
                                 const wr::IdNamespace& aIdNamespace,
                                 const TimeStamp& aFwdTime)
{
  AutoProfilerTracing tracing("Paint", "DPTransaction");
  UpdateFwdTransactionId(aFwdTransactionId);
  AutoClearReadLocks clearLocks(mReadLocks);

  if (mDestroyed) {
    for (const auto& op : aToDestroy) {
      DestroyActor(op);
    }
    return;
  }
  // This ensures that destroy operations are always processed. It is not safe
  // to early-return from RecvDPEnd without doing so.
  AutoWebRenderBridgeParentAsyncMessageSender autoAsyncMessageSender(this, &aToDestroy);

  uint32_t wrEpoch = GetNextWrEpoch();
  ProcessWebRenderCommands(aSize, aCommands, wr::NewEpoch(wrEpoch),
                           aContentSize, dl, dlDesc, aIdNamespace);
  HoldPendingTransactionId(wrEpoch, aTransactionId, aFwdTime);

  mScrollData = aScrollData;
  UpdateAPZ();

  if (mIdNamespace != aIdNamespace) {
    // Pretend we composited since someone is wating for this event,
    // though DisplayList was not pushed to webrender.
    TimeStamp now = TimeStamp::Now();
    mCompositorBridge->DidComposite(wr::AsUint64(mPipelineId), now, now);
  }
}