Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
0d43469b
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0d43469b
编写于
10月 22, 2019
作者:
G
gaaclarke
提交者:
GitHub
10月 22, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Made restarting the Engine remember the last entrypoint that was used. (#13264)" (#13287)
This reverts commit
9dd585c4
.
上级
9dd585c4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
49 deletion
+8
-49
shell/common/engine.cc
shell/common/engine.cc
+0
-11
shell/common/engine.h
shell/common/engine.h
+0
-14
shell/common/shell.cc
shell/common/shell.cc
+4
-3
shell/common/shell.h
shell/common/shell.h
+4
-0
shell/common/shell_unittests.cc
shell/common/shell_unittests.cc
+0
-21
未找到文件。
shell/common/engine.cc
浏览文件 @
0d43469b
...
@@ -128,9 +128,6 @@ Engine::RunStatus Engine::Run(RunConfiguration configuration) {
...
@@ -128,9 +128,6 @@ Engine::RunStatus Engine::Run(RunConfiguration configuration) {
return
RunStatus
::
Failure
;
return
RunStatus
::
Failure
;
}
}
last_entry_point_
=
configuration
.
GetEntrypoint
();
last_entry_point_library_
=
configuration
.
GetEntrypointLibrary
();
auto
isolate_launch_status
=
auto
isolate_launch_status
=
PrepareAndLaunchIsolate
(
std
::
move
(
configuration
));
PrepareAndLaunchIsolate
(
std
::
move
(
configuration
));
if
(
isolate_launch_status
==
Engine
::
RunStatus
::
Failure
)
{
if
(
isolate_launch_status
==
Engine
::
RunStatus
::
Failure
)
{
...
@@ -506,12 +503,4 @@ void Engine::HandleAssetPlatformMessage(fml::RefPtr<PlatformMessage> message) {
...
@@ -506,12 +503,4 @@ void Engine::HandleAssetPlatformMessage(fml::RefPtr<PlatformMessage> message) {
response
->
CompleteEmpty
();
response
->
CompleteEmpty
();
}
}
const
std
::
string
&
Engine
::
GetLastEntrypoint
()
const
{
return
last_entry_point_
;
}
const
std
::
string
&
Engine
::
GetLastEntrypointLibrary
()
const
{
return
last_entry_point_library_
;
}
}
// namespace flutter
}
// namespace flutter
shell/common/engine.h
浏览文件 @
0d43469b
...
@@ -717,18 +717,6 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
...
@@ -717,18 +717,6 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
// |PointerDataDispatcher::Delegate|
// |PointerDataDispatcher::Delegate|
void
ScheduleSecondaryVsyncCallback
(
fml
::
closure
callback
)
override
;
void
ScheduleSecondaryVsyncCallback
(
fml
::
closure
callback
)
override
;
//----------------------------------------------------------------------------
/// @brief Get the last Entrypoint that was used in the RunConfiguration
/// when |Engine::Run| was called.
///
const
std
::
string
&
GetLastEntrypoint
()
const
;
//----------------------------------------------------------------------------
/// @brief Get the last Entrypoint Library that was used in the
/// RunConfiguration when |Engine::Run| was called.
///
const
std
::
string
&
GetLastEntrypointLibrary
()
const
;
private:
private:
Engine
::
Delegate
&
delegate_
;
Engine
::
Delegate
&
delegate_
;
const
Settings
settings_
;
const
Settings
settings_
;
...
@@ -740,8 +728,6 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
...
@@ -740,8 +728,6 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
// is destructed first.
// is destructed first.
std
::
unique_ptr
<
PointerDataDispatcher
>
pointer_data_dispatcher_
;
std
::
unique_ptr
<
PointerDataDispatcher
>
pointer_data_dispatcher_
;
std
::
string
last_entry_point_
;
std
::
string
last_entry_point_library_
;
std
::
string
initial_route_
;
std
::
string
initial_route_
;
ViewportMetrics
viewport_metrics_
;
ViewportMetrics
viewport_metrics_
;
std
::
shared_ptr
<
AssetManager
>
asset_manager_
;
std
::
shared_ptr
<
AssetManager
>
asset_manager_
;
...
...
shell/common/shell.cc
浏览文件 @
0d43469b
...
@@ -545,10 +545,14 @@ fml::WeakPtr<Rasterizer> Shell::GetRasterizer() {
...
@@ -545,10 +545,14 @@ fml::WeakPtr<Rasterizer> Shell::GetRasterizer() {
return
weak_rasterizer_
;
return
weak_rasterizer_
;
}
}
// TODO(dnfield): Remove this when either Topaz is up to date or flutter_runner
// is built out of this repo.
#ifdef OS_FUCHSIA
fml
::
WeakPtr
<
Engine
>
Shell
::
GetEngine
()
{
fml
::
WeakPtr
<
Engine
>
Shell
::
GetEngine
()
{
FML_DCHECK
(
is_setup_
);
FML_DCHECK
(
is_setup_
);
return
weak_engine_
;
return
weak_engine_
;
}
}
#endif // OS_FUCHSIA
fml
::
WeakPtr
<
PlatformView
>
Shell
::
GetPlatformView
()
{
fml
::
WeakPtr
<
PlatformView
>
Shell
::
GetPlatformView
()
{
FML_DCHECK
(
is_setup_
);
FML_DCHECK
(
is_setup_
);
...
@@ -1267,9 +1271,6 @@ bool Shell::OnServiceProtocolRunInView(
...
@@ -1267,9 +1271,6 @@ bool Shell::OnServiceProtocolRunInView(
RunConfiguration
configuration
(
std
::
move
(
isolate_configuration
));
RunConfiguration
configuration
(
std
::
move
(
isolate_configuration
));
configuration
.
SetEntrypointAndLibrary
(
engine_
->
GetLastEntrypoint
(),
engine_
->
GetLastEntrypointLibrary
());
configuration
.
AddAssetResolver
(
configuration
.
AddAssetResolver
(
std
::
make_unique
<
DirectoryAssetBundle
>
(
fml
::
OpenDirectory
(
std
::
make_unique
<
DirectoryAssetBundle
>
(
fml
::
OpenDirectory
(
asset_directory_path
.
c_str
(),
false
,
fml
::
FilePermission
::
kRead
)));
asset_directory_path
.
c_str
(),
false
,
fml
::
FilePermission
::
kRead
)));
...
...
shell/common/shell.h
浏览文件 @
0d43469b
...
@@ -216,6 +216,9 @@ class Shell final : public PlatformView::Delegate,
...
@@ -216,6 +216,9 @@ class Shell final : public PlatformView::Delegate,
///
///
fml
::
WeakPtr
<
Rasterizer
>
GetRasterizer
();
fml
::
WeakPtr
<
Rasterizer
>
GetRasterizer
();
// TODO(dnfield): Remove this when either Topaz is up to date or flutter_runner
// is built out of this repo.
#ifdef OS_FUCHSIA
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
/// @brief Engines may only be accessed on the UI thread. This method is
/// @brief Engines may only be accessed on the UI thread. This method is
/// deprecated, and implementers should instead use other API
/// deprecated, and implementers should instead use other API
...
@@ -224,6 +227,7 @@ class Shell final : public PlatformView::Delegate,
...
@@ -224,6 +227,7 @@ class Shell final : public PlatformView::Delegate,
/// @return A weak pointer to the engine.
/// @return A weak pointer to the engine.
///
///
fml
::
WeakPtr
<
Engine
>
GetEngine
();
fml
::
WeakPtr
<
Engine
>
GetEngine
();
#endif // OS_FUCHSIA
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
/// @brief Platform views may only be accessed on the platform task
/// @brief Platform views may only be accessed on the platform task
...
...
shell/common/shell_unittests.cc
浏览文件 @
0d43469b
...
@@ -202,27 +202,6 @@ TEST_F(ShellTest, SecondaryIsolateBindingsAreSetupViaShellSettings) {
...
@@ -202,27 +202,6 @@ TEST_F(ShellTest, SecondaryIsolateBindingsAreSetupViaShellSettings) {
ASSERT_FALSE
(
DartVMRef
::
IsInstanceRunning
());
ASSERT_FALSE
(
DartVMRef
::
IsInstanceRunning
());
}
}
TEST_F
(
ShellTest
,
LastEntrypoint
)
{
ASSERT_FALSE
(
DartVMRef
::
IsInstanceRunning
());
auto
settings
=
CreateSettingsForFixture
();
auto
shell
=
CreateShell
(
settings
);
ASSERT_TRUE
(
ValidateShell
(
shell
.
get
()));
auto
configuration
=
RunConfiguration
::
InferFromSettings
(
settings
);
ASSERT_TRUE
(
configuration
.
IsValid
());
std
::
string
entry_point
=
"fixturesAreFunctionalMain"
;
configuration
.
SetEntrypoint
(
entry_point
);
fml
::
AutoResetWaitableEvent
main_latch
;
AddNativeCallback
(
"SayHiFromFixturesAreFunctionalMain"
,
CREATE_NATIVE_ENTRY
([
&
main_latch
](
auto
args
)
{
main_latch
.
Signal
();
}));
RunEngine
(
shell
.
get
(),
std
::
move
(
configuration
));
main_latch
.
Wait
();
EXPECT_EQ
(
entry_point
,
shell
->
GetEngine
()
->
GetLastEntrypoint
());
}
TEST
(
ShellTestNoFixture
,
EnableMirrorsIsWhitelisted
)
{
TEST
(
ShellTestNoFixture
,
EnableMirrorsIsWhitelisted
)
{
if
(
DartVM
::
IsRunningPrecompiledCode
())
{
if
(
DartVM
::
IsRunningPrecompiledCode
())
{
// This covers profile and release modes which use AOT (where this flag does
// This covers profile and release modes which use AOT (where this flag does
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录