-
Notifications
You must be signed in to change notification settings - Fork 102
/
view_manager.txt
55 lines (37 loc) · 1.89 KB
/
view_manager.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
viewstate是数据类,viewimpl是行为类
view_manager::ViewManagerApp app;
new ViewRegistry(startup_context_.get())
startup_context_->ConnectToEnvironmentService<fuchsia::ui::scenic::Scenic>()
Session::Session(fuchsia::ui::scenic::Scenic* scenic)
scenic->CreateSession(session_.NewRequest(), session_listener_binding_.NewBinding());
scenic创建的session接口主要是enqueue, present.
====>
进入scenic进程:
Scenic::CreateSession()
CreateSessionImmediately(std::move(session_request), std::move(listener));
Session::Session()
system->CreateCommandDispatcher(CommandDispatcherContext(this, session.get()));
GfxSystem::CreateCommandDispatcher()
engine_->session_manager()->CreateCommandDispatcher(std::move(context),engine_.get());
session_bindings_.AddBinding(std::move(session), std::move(session_request));
开始监听了
========
ViewRegistry::CreateView
new ViewState(this, std::move(view_token), std::move(view_request), std::move(view_listener), &session_, SanitizeLabel(label));
SchedulePresentSession();
ViewRegistry::PresentSession()
session_.Present(0, [this](fuchsia::images::PresentationInfo info) {});
session_->Present(presentation_time, std::move(acquire_fences_),
std::move(release_fences_), std::move(callback));
========
Scenic:
Session::Present
delegate->Present(presentation_time, std::move(acquire_fences), std::move(release_fences), std::move(callback));
SessionHandler::Present
session_->ScheduleUpdate
weak->engine_->session_manager()->ScheduleUpdateForSession
update_scheduler->ScheduleUpdate(presentation_time);
RenderFrame(FrameTimingsPtr(), presentation_time, 0, false);
Compositor::DrawFrame
以上作废
====