blob: 4d94c1db4ce288a8b6efd95b59647142b05abbb3 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/ui/scenic/cpp/view_creation_tokens.h>
using fuchsia::ui::views::ViewCreationToken;
using fuchsia::ui::views::ViewportCreationToken;
namespace scenic {
ViewCreationTokenPair ViewCreationTokenPair::New() {
ViewportCreationToken parent_token;
ViewCreationToken child_token;
zx::channel::create(0, &parent_token.value, &child_token.value);
return {.view_token = std::move(child_token), .viewport_token = std::move(parent_token)};
}
} // namespace scenic