Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
68d3553f
E
engine
项目概览
qq_34031325
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
68d3553f
编写于
7月 26, 2017
作者:
I
Ian McKellar
提交者:
GitHub
7月 26, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use the tonic::HandleTable (#3924)
上级
8ee1910c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
12 deletion
+21
-12
content_handler/BUILD.gn
content_handler/BUILD.gn
+1
-1
content_handler/runtime_holder.cc
content_handler/runtime_holder.cc
+14
-10
lib/ui/compositing/scene_host.cc
lib/ui/compositing/scene_host.cc
+6
-1
未找到文件。
content_handler/BUILD.gn
浏览文件 @
68d3553f
...
...
@@ -63,7 +63,7 @@ template("flutter_content_handler") {
"//lib/fidl/dart/sdk_ext",
"//lib/ftl",
"//lib/mtl",
"//lib/tonic
/mx
",
"//lib/tonic",
"//lib/zip",
"//magma:vulkan",
"//third_party/rapidjson",
...
...
content_handler/runtime_holder.cc
浏览文件 @
68d3553f
...
...
@@ -25,13 +25,14 @@
#include "lib/ftl/logging.h"
#include "lib/ftl/time/time_delta.h"
#include "lib/mtl/vmo/vector.h"
#include "lib/tonic/
mx/mx_converter
.h"
#include "lib/tonic/
handle_table
.h"
#include "lib/zip/create_unzipper.h"
#include "third_party/rapidjson/rapidjson/document.h"
#include "third_party/rapidjson/rapidjson/stringbuffer.h"
#include "third_party/rapidjson/rapidjson/writer.h"
using
tonic
::
DartConverter
;
using
tonic
::
HandleTable
;
using
tonic
::
ToDart
;
namespace
flutter_runner
{
...
...
@@ -364,13 +365,15 @@ void RuntimeHolder::InitFidlInternal() {
DART_CHECK_VALID
(
Dart_SetNativeResolver
(
fidl_internal
,
fidl
::
dart
::
NativeLookup
,
fidl
::
dart
::
NativeSymbol
));
DART_CHECK_VALID
(
Dart_SetField
(
fidl_internal
,
ToDart
(
"_environment"
),
DartConverter
<
mx
::
channel
>::
ToDart
(
environment
.
PassHandle
())));
HandleTable
&
handle_table
=
HandleTable
::
Current
();
DART_CHECK_VALID
(
Dart_SetField
(
fidl_internal
,
ToDart
(
"_outgoingServices"
),
DartConverter
<
mx
::
channel
>::
ToDart
(
outgoing_services_
.
PassChannel
())));
DART_CHECK_VALID
(
Dart_SetField
(
fidl_internal
,
ToDart
(
"_environment"
),
handle_table
.
AddAndWrap
(
environment
.
PassHandle
())));
DART_CHECK_VALID
(
Dart_SetField
(
fidl_internal
,
ToDart
(
"_outgoingServices"
),
handle_table
.
AddAndWrap
(
outgoing_services_
.
PassChannel
())));
}
void
RuntimeHolder
::
InitMozartInternal
()
{
...
...
@@ -388,9 +391,10 @@ void RuntimeHolder::InitMozartInternal() {
DartConverter
<
uint64_t
>::
ToDart
(
reinterpret_cast
<
intptr_t
>
(
static_cast
<
mozart
::
NativesDelegate
*>
(
this
)))));
DART_CHECK_VALID
(
Dart_SetField
(
mozart_internal
,
ToDart
(
"_viewContainer"
),
DartConverter
<
mx
::
channel
>::
ToDart
(
view_container
.
PassHandle
())));
HandleTable
&
handle_table
=
HandleTable
::
Current
();
DART_CHECK_VALID
(
Dart_SetField
(
mozart_internal
,
ToDart
(
"_viewContainer"
),
handle_table
.
AddAndWrap
(
view_container
.
PassHandle
())));
}
void
RuntimeHolder
::
InitRootBundle
(
std
::
vector
<
char
>
bundle
)
{
...
...
lib/ui/compositing/scene_host.cc
浏览文件 @
68d3553f
...
...
@@ -8,6 +8,10 @@
#include "lib/tonic/dart_binding_macros.h"
#include "lib/tonic/dart_library_natives.h"
#if defined(OS_FUCHSIA)
#include "lib/tonic/handle_table.h"
#endif
namespace
blink
{
static
void
SceneHost_constructor
(
Dart_NativeArguments
args
)
{
...
...
@@ -31,7 +35,8 @@ ftl::RefPtr<SceneHost> SceneHost::create(int export_token_handle) {
SceneHost
::
SceneHost
(
int
export_token_handle
)
{
#if defined(OS_FUCHSIA)
export_node_
=
ftl
::
MakeRefCounted
<
flow
::
ExportNode
>
(
export_token_handle
);
export_node_
=
ftl
::
MakeRefCounted
<
flow
::
ExportNode
>
(
tonic
::
HandleTable
::
Current
().
Unwrap
(
export_token_handle
));
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录