Skip to content

Commit

Permalink
[scenic] Rename mozart->scenic. (flutter#4792)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejurka committed Mar 15, 2018
1 parent f192c59 commit 94bee9d
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion content_handler/rasterizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
12 changes: 6 additions & 6 deletions content_handler/runtime_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -419,7 +419,7 @@ void RuntimeHolder::DidCreateMainIsolate(Dart_Isolate isolate) {
InitDartIoInternal();
InitFuchsia();
InitZircon();
InitMozartInternal();
InitScenicInternal();
}

void RuntimeHolder::InitDartIoInternal() {
Expand Down Expand Up @@ -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());

Expand Down
2 changes: 1 addition & 1 deletion content_handler/runtime_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class RuntimeHolder : public blink::RuntimeDelegate,
void InitDartIoInternal();
void InitFuchsia();
void InitZircon();
void InitMozartInternal();
void InitScenicInternal();

void PostBeginFrame();
void BeginFrame();
Expand Down
10 changes: 5 additions & 5 deletions content_handler/session_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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);
Expand All @@ -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() &&
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions content_handler/session_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
};
Expand Down
4 changes: 2 additions & 2 deletions content_handler/vulkan_rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion content_handler/vulkan_rasterizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion flow/export_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion flow/scene_update_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 94bee9d

Please sign in to comment.