未验证 提交 94bee9d7 编写于 作者: M mikejurka 提交者: GitHub

[scenic] Rename mozart->scenic. (#4792)

上级 f192c59d
......@@ -21,7 +21,7 @@ class Rasterizer {
static std::unique_ptr<Rasterizer> Create();
virtual void SetScene(
f1dl::InterfaceHandle<ui_mozart::Mozart> mozart,
f1dl::InterfaceHandle<ui::Scenic> mozart,
zx::eventpair import_token,
fxl::Closure metrics_changed_callback) = 0;
......
......@@ -238,18 +238,18 @@ void RuntimeHolder::CreateView(
input_connection_->SetEventListener(std::move(input_listener));
// Setup the session.
f1dl::InterfaceHandle<ui_mozart::Mozart> mozart;
view_manager_->GetMozart(mozart.NewRequest());
f1dl::InterfaceHandle<ui::Scenic> scenic;
view_manager_->GetScenic(scenic.NewRequest());
blink::Threads::Gpu()->PostTask(fxl::MakeCopyable([
rasterizer = rasterizer_.get(), //
mozart = std::move(mozart), //
scenic = std::move(scenic), //
import_token = std::move(import_token), //
weak_runtime_holder = GetWeakPtr()
]() mutable {
ASSERT_IS_GPU_THREAD;
rasterizer->SetScene(
std::move(mozart), std::move(import_token),
std::move(scenic), std::move(import_token),
// TODO(MZ-222): Ideally we would immediately redraw the previous layer
// tree when the metrics change since there's no need to rerecord it.
// However, we want to make sure there's only one outstanding frame.
......@@ -419,7 +419,7 @@ void RuntimeHolder::DidCreateMainIsolate(Dart_Isolate isolate) {
InitDartIoInternal();
InitFuchsia();
InitZircon();
InitMozartInternal();
InitScenicInternal();
}
void RuntimeHolder::InitDartIoInternal() {
......@@ -466,7 +466,7 @@ void RuntimeHolder::InitZircon() {
ToDart(reinterpret_cast<intptr_t>(namespc_))));
}
void RuntimeHolder::InitMozartInternal() {
void RuntimeHolder::InitScenicInternal() {
f1dl::InterfaceHandle<mozart::ViewContainer> view_container;
view_->GetContainer(view_container.NewRequest());
......
......@@ -101,7 +101,7 @@ class RuntimeHolder : public blink::RuntimeDelegate,
void InitDartIoInternal();
void InitFuchsia();
void InitZircon();
void InitMozartInternal();
void InitScenicInternal();
void PostBeginFrame();
void BeginFrame();
......
......@@ -7,9 +7,9 @@
namespace flutter_runner {
SessionConnection::SessionConnection(ui_mozart::MozartPtr mozart,
SessionConnection::SessionConnection(ui::ScenicPtr scenic,
zx::eventpair import_token)
: session_(mozart.get()),
: session_(scenic.get()),
root_node_(&session_),
surface_producer_(std::make_unique<VulkanSurfaceProducer>(&session_)),
scene_update_context_(&session_, surface_producer_.get()) {
......@@ -22,7 +22,7 @@ SessionConnection::SessionConnection(ui_mozart::MozartPtr mozart,
root_node_.Bind(std::move(import_token));
root_node_.SetEventMask(scenic::kMetricsEventMask);
session_.Present(0, [](ui_mozart::PresentationInfoPtr info) {});
session_.Present(0, [](ui::PresentationInfoPtr info) {});
present_callback_ =
std::bind(&SessionConnection::OnPresent, this, std::placeholders::_1);
......@@ -39,7 +39,7 @@ void SessionConnection::OnSessionError() {
}
void SessionConnection::OnSessionEvents(
f1dl::Array<ui_mozart::EventPtr> events) {
f1dl::Array<ui::EventPtr> events) {
scenic::MetricsPtr new_metrics;
for (const auto& event : events) {
if (event->is_scenic() && event->get_scenic()->is_metrics() &&
......@@ -81,7 +81,7 @@ void SessionConnection::Present(flow::CompositorContext::ScopedFrame& frame,
EnqueueClearOps();
}
void SessionConnection::OnPresent(ui_mozart::PresentationInfoPtr info) {
void SessionConnection::OnPresent(ui::PresentationInfoPtr info) {
ASSERT_IS_GPU_THREAD;
auto callback = pending_on_present_callback_;
pending_on_present_callback_ = nullptr;
......
......@@ -20,7 +20,7 @@ namespace flutter_runner {
class SessionConnection {
public:
SessionConnection(ui_mozart::MozartPtr mozart, zx::eventpair import_token);
SessionConnection(ui::ScenicPtr scenic, zx::eventpair import_token);
~SessionConnection();
......@@ -56,11 +56,11 @@ class SessionConnection {
fxl::Closure metrics_changed_callback_;
void OnSessionError();
void OnSessionEvents(f1dl::Array<ui_mozart::EventPtr> events);
void OnSessionEvents(f1dl::Array<ui::EventPtr> events);
void EnqueueClearOps();
void OnPresent(ui_mozart::PresentationInfoPtr info);
void OnPresent(ui::PresentationInfoPtr info);
FXL_DISALLOW_COPY_AND_ASSIGN(SessionConnection);
};
......
......@@ -53,13 +53,13 @@ bool VulkanRasterizer::IsValid() const {
return valid_;
}
void VulkanRasterizer::SetScene(f1dl::InterfaceHandle<ui_mozart::Mozart> mozart,
void VulkanRasterizer::SetScene(f1dl::InterfaceHandle<ui::Scenic> scenic,
zx::eventpair import_token,
fxl::Closure metrics_changed_callback) {
ASSERT_IS_GPU_THREAD;
FXL_DCHECK(valid_ && !session_connection_);
session_connection_ = std::make_unique<SessionConnection>(
mozart.Bind(), std::move(import_token));
scenic.Bind(), std::move(import_token));
session_connection_->set_metrics_changed_callback(
std::move(metrics_changed_callback));
}
......
......@@ -22,7 +22,7 @@ class VulkanRasterizer : public Rasterizer {
bool IsValid() const;
void SetScene(f1dl::InterfaceHandle<ui_mozart::Mozart> mozart,
void SetScene(f1dl::InterfaceHandle<ui::Scenic> scenic,
zx::eventpair import_token,
fxl::Closure metrics_changed_callback) override;
......
......@@ -51,7 +51,7 @@ void ExportNode::Bind(SceneUpdateContext& context,
node_.reset(new scenic_lib::EntityNode(container.session()));
node_->Export(std::move(export_token_));
// Add ourselves to the context so it can call Dispose() on us if the Mozart
// Add ourselves to the context so it can call Dispose() on us if the Scenic
// session is closed.
context.AddExportNode(this);
scene_update_context_ = &context;
......
......@@ -21,7 +21,7 @@ SceneUpdateContext::SceneUpdateContext(scenic_lib::Session* session,
SceneUpdateContext::~SceneUpdateContext() {
ASSERT_IS_GPU_THREAD;
// Release Mozart session resources for all ExportNodes.
// Release Scenic session resources for all ExportNodes.
for (auto export_node : export_nodes_) {
export_node->Dispose(false);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册