Esempio n. 1
0
bool
ImageBridgeParent::RecvUpdate(const EditArray& aEdits, EditReplyArray* aReply)
{
    // If we don't actually have a compositor, then don't bother
    // creating any textures.
    if (Compositor::GetBackend() == LayersBackend::LAYERS_NONE) {
        return true;
    }

    // Clear fence handles used in previsou transaction.
    ClearPrevFenceHandles();

    EditReplyVector replyv;
    for (EditArray::index_type i = 0; i < aEdits.Length(); ++i) {
        if (!ReceiveCompositableUpdate(aEdits[i], replyv)) {
            return false;
        }
    }

    aReply->SetCapacity(replyv.size());
    if (replyv.size() > 0) {
        aReply->AppendElements(&replyv.front(), replyv.size());
    }

    // Ensure that any pending operations involving back and front
    // buffers have completed, so that neither process stomps on the
    // other's buffer contents.
    LayerManagerComposite::PlatformSyncBeforeReplyUpdate();

    return true;
}
Esempio n. 2
0
bool
ImageBridgeParent::RecvUpdate(const EditArray& aEdits, EditReplyArray* aReply)
{
  EditReplyVector replyv;
  for (EditArray::index_type i = 0; i < aEdits.Length(); ++i) {
    ReceiveCompositableUpdate(aEdits[i], replyv);
  }

  aReply->SetCapacity(replyv.size());
  if (replyv.size() > 0) {
    aReply->AppendElements(&replyv.front(), replyv.size());
  }

  // Ensure that any pending operations involving back and front
  // buffers have completed, so that neither process stomps on the
  // other's buffer contents.
  LayerManagerComposite::PlatformSyncBeforeReplyUpdate();

  return true;
}