Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
e2aa235a
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,发现更多精彩内容 >>
未验证
提交
e2aa235a
编写于
11月 25, 2019
作者:
D
David Worsham
提交者:
GitHub
11月 25, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix most fml tests on Fuchsia (#14007)
* Add fuchsia MessageLoopImpl; fix several tests
上级
c2d451f6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
107 addition
and
13 deletion
+107
-13
ci/licenses_golden/licenses_flutter
ci/licenses_golden/licenses_flutter
+2
-0
fml/BUILD.gn
fml/BUILD.gn
+25
-11
fml/message_loop_impl.cc
fml/message_loop_impl.cc
+4
-0
fml/platform/fuchsia/message_loop_fuchsia.cc
fml/platform/fuchsia/message_loop_fuchsia.cc
+38
-0
fml/platform/fuchsia/message_loop_fuchsia.h
fml/platform/fuchsia/message_loop_fuchsia.h
+36
-0
shell/platform/fuchsia/flutter/meta/flutter_runner_tests.cmx
shell/platform/fuchsia/flutter/meta/flutter_runner_tests.cmx
+1
-1
testing/fuchsia/meta/fuchsia_test.cmx
testing/fuchsia/meta/fuchsia_test.cmx
+1
-1
未找到文件。
ci/licenses_golden/licenses_flutter
浏览文件 @
e2aa235a
...
...
@@ -170,6 +170,8 @@ FILE: ../../../flutter/fml/platform/darwin/scoped_nsobject.mm
FILE: ../../../flutter/fml/platform/darwin/string_range_sanitization.h
FILE: ../../../flutter/fml/platform/darwin/string_range_sanitization.mm
FILE: ../../../flutter/fml/platform/darwin/string_range_sanitization_unittests.mm
FILE: ../../../flutter/fml/platform/fuchsia/message_loop_fuchsia.cc
FILE: ../../../flutter/fml/platform/fuchsia/message_loop_fuchsia.h
FILE: ../../../flutter/fml/platform/fuchsia/paths_fuchsia.cc
FILE: ../../../flutter/fml/platform/linux/message_loop_linux.cc
FILE: ../../../flutter/fml/platform/linux/message_loop_linux.h
...
...
fml/BUILD.gn
浏览文件 @
e2aa235a
...
...
@@ -164,12 +164,28 @@ source_set("fml") {
}
if (is_fuchsia) {
sources += [ "platform/fuchsia/paths_fuchsia.cc" ]
sources += [
"platform/fuchsia/message_loop_fuchsia.cc",
"platform/fuchsia/message_loop_fuchsia.h",
"platform/fuchsia/paths_fuchsia.cc",
]
if (using_fuchsia_sdk) {
public_deps += [ "$fuchsia_sdk_root/pkg:trace" ]
public_deps += [
"$fuchsia_sdk_root/pkg:async-cpp",
"$fuchsia_sdk_root/pkg:async-loop-cpp",
"$fuchsia_sdk_root/pkg:async-loop-default",
"$fuchsia_sdk_root/pkg:trace",
"$fuchsia_sdk_root/pkg:zx",
]
} else {
public_deps += [ "//zircon/public/lib/trace" ]
public_deps += [
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/trace",
"//zircon/public/lib/zx",
]
}
}
...
...
@@ -205,16 +221,21 @@ executable("fml_unittests") {
sources = [
"base32_unittest.cc",
"command_line_unittest.cc",
"gpu_thread_merger_unittests.cc",
"memory/ref_counted_unittest.cc",
"memory/weak_ptr_unittest.cc",
"message_loop_task_queues_merge_unmerge_unittests.cc",
"message_loop_task_queues_unittests.cc",
"message_loop_unittests.cc",
"message_unittests.cc",
"paths_unittests.cc",
"platform/darwin/string_range_sanitization_unittests.mm",
"synchronization/count_down_latch_unittests.cc",
"synchronization/semaphore_unittest.cc",
"synchronization/sync_switch_unittest.cc",
"synchronization/waitable_event_unittest.cc",
"thread_local_unittests.cc",
"thread_unittests.cc",
"time/time_delta_unittest.cc",
"time/time_point_unittest.cc",
"time/time_unittest.cc",
...
...
@@ -222,14 +243,7 @@ executable("fml_unittests") {
# TODO(gw280): Figure out why these tests don't work currently on Fuchsia
if (!is_fuchsia) {
sources += [
"file_unittest.cc",
"gpu_thread_merger_unittests.cc",
"message_loop_task_queues_unittests.cc",
"message_loop_unittests.cc",
"synchronization/count_down_latch_unittests.cc",
"thread_unittests.cc",
]
sources += [ "file_unittest.cc" ]
}
deps = [
...
...
fml/message_loop_impl.cc
浏览文件 @
e2aa235a
...
...
@@ -17,6 +17,8 @@
#include "flutter/fml/platform/darwin/message_loop_darwin.h"
#elif OS_ANDROID
#include "flutter/fml/platform/android/message_loop_android.h"
#elif OS_FUCHSIA
#include "flutter/fml/platform/fuchsia/message_loop_fuchsia.h"
#elif OS_LINUX
#include "flutter/fml/platform/linux/message_loop_linux.h"
#elif OS_WIN
...
...
@@ -30,6 +32,8 @@ fml::RefPtr<MessageLoopImpl> MessageLoopImpl::Create() {
return
fml
::
MakeRefCounted
<
MessageLoopDarwin
>
();
#elif OS_ANDROID
return
fml
::
MakeRefCounted
<
MessageLoopAndroid
>
();
#elif OS_FUCHSIA
return
fml
::
MakeRefCounted
<
MessageLoopFuchsia
>
();
#elif OS_LINUX
return
fml
::
MakeRefCounted
<
MessageLoopLinux
>
();
#elif OS_WIN
...
...
fml/platform/fuchsia/message_loop_fuchsia.cc
0 → 100644
浏览文件 @
e2aa235a
// Copyright 2013 The Flutter 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 "flutter/fml/platform/fuchsia/message_loop_fuchsia.h"
#include <lib/async-loop/default.h>
#include <lib/async/cpp/task.h>
#include <lib/zx/time.h>
namespace
fml
{
MessageLoopFuchsia
::
MessageLoopFuchsia
()
:
loop_
(
&
kAsyncLoopConfigAttachToCurrentThread
)
{}
MessageLoopFuchsia
::~
MessageLoopFuchsia
()
=
default
;
void
MessageLoopFuchsia
::
Run
()
{
loop_
.
Run
();
}
void
MessageLoopFuchsia
::
Terminate
()
{
loop_
.
Quit
();
}
void
MessageLoopFuchsia
::
WakeUp
(
fml
::
TimePoint
time_point
)
{
fml
::
TimePoint
now
=
fml
::
TimePoint
::
Now
();
zx
::
duration
due_time
{
0
};
if
(
time_point
>
now
)
{
due_time
=
zx
::
nsec
((
time_point
-
now
).
ToNanoseconds
());
}
FML_DCHECK
(
async
::
PostDelayedTask
(
loop_
.
dispatcher
(),
[
this
]()
{
RunExpiredTasksNow
();
},
due_time
)
==
ZX_OK
);
}
}
// namespace fml
fml/platform/fuchsia/message_loop_fuchsia.h
0 → 100644
浏览文件 @
e2aa235a
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_FML_PLATFORM_FUCHSIA_MESSAGE_LOOP_FUCHSIA_H_
#define FLUTTER_FML_PLATFORM_FUCHSIA_MESSAGE_LOOP_FUCHSIA_H_
#include <lib/async-loop/cpp/loop.h>
#include "flutter/fml/macros.h"
#include "flutter/fml/message_loop_impl.h"
namespace
fml
{
class
MessageLoopFuchsia
:
public
MessageLoopImpl
{
private:
MessageLoopFuchsia
();
~
MessageLoopFuchsia
()
override
;
void
Run
()
override
;
void
Terminate
()
override
;
void
WakeUp
(
fml
::
TimePoint
time_point
)
override
;
async
::
Loop
loop_
;
FML_FRIEND_MAKE_REF_COUNTED
(
MessageLoopFuchsia
);
FML_FRIEND_REF_COUNTED_THREAD_SAFE
(
MessageLoopFuchsia
);
FML_DISALLOW_COPY_AND_ASSIGN
(
MessageLoopFuchsia
);
};
}
// namespace fml
#endif // FLUTTER_FML_PLATFORM_FUCHSIA_MESSAGE_LOOP_FUCHSIA_H_
shell/platform/fuchsia/flutter/meta/flutter_runner_tests.cmx
浏览文件 @
e2aa235a
...
...
@@ -10,7 +10,7 @@
"services": [
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.intl.PropertyProvider",
"fuchsia.
sy
s.Launcher"
"fuchsia.
proces
s.Launcher"
]
}
}
testing/fuchsia/meta/fuchsia_test.cmx
浏览文件 @
e2aa235a
...
...
@@ -9,7 +9,7 @@
],
"services": [
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.
sy
s.Launcher"
"fuchsia.
proces
s.Launcher"
]
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录