Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
9c1e4843
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,发现更多精彩内容 >>
未验证
提交
9c1e4843
编写于
3月 09, 2018
作者:
A
Alhaad Gokhale
提交者:
GitHub
3月 09, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updates for Fuchsia roll. (#4765)
* AssetProvider * libtxt
上级
14c940e2
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
10 addition
and
8 deletion
+10
-8
content_handler/app.cc
content_handler/app.cc
+3
-2
content_handler/runtime_holder.cc
content_handler/runtime_holder.cc
+5
-5
content_handler/runtime_holder.h
content_handler/runtime_holder.h
+2
-1
未找到文件。
content_handler/app.cc
浏览文件 @
9c1e4843
...
...
@@ -74,7 +74,8 @@ App::App() {
if
(
settings
.
using_blink
)
{
blink
::
SetFontProvider
(
std
::
move
(
font_provider
));
}
else
{
blink
::
FontCollection
::
ForProcess
().
GetFontCollection
()
->
PushFront
(
blink
::
FontCollection
::
ForProcess
().
GetFontCollection
()
->
SetAssetFontManager
(
sk_make_sp
<
txt
::
FuchsiaFontManager
>
(
std
::
move
(
font_provider
)));
}
...
...
content_handler/runtime_holder.cc
浏览文件 @
9c1e4843
...
...
@@ -411,8 +411,8 @@ void RuntimeHolder::HandlePlatformMessage(
}
void
RuntimeHolder
::
DidCreateMainIsolate
(
Dart_Isolate
isolate
)
{
if
(
directory_asset_bundle
_
)
{
blink
::
AssetFontSelector
::
Install
(
directory_asset_bundle
_
);
if
(
asset_provider
_
)
{
blink
::
AssetFontSelector
::
Install
(
asset_provider
_
);
}
else
if
(
asset_store_
)
{
blink
::
AssetFontSelector
::
Install
(
asset_store_
);
}
...
...
@@ -504,7 +504,7 @@ void RuntimeHolder::InitRootBundle(std::vector<char> bundle) {
FXL_LOG
(
ERROR
)
<<
"Unable to load data dir"
;
return
;
}
directory_asset_bundle
_
=
asset_provider
_
=
fxl
::
MakeRefCounted
<
blink
::
DirectoryAssetBundle
>
(
std
::
move
(
data_dir
));
}
}
...
...
@@ -532,8 +532,8 @@ bool RuntimeHolder::HandleAssetPlatformMessage(
bool
RuntimeHolder
::
GetAssetAsBuffer
(
const
std
::
string
&
name
,
std
::
vector
<
uint8_t
>*
data
)
{
return
(
directory_asset_bundle
_
&&
directory_asset_bundle
_
->
GetAsBuffer
(
name
,
data
))
||
return
(
asset_provider
_
&&
asset_provider
_
->
GetAsBuffer
(
name
,
data
))
||
(
asset_store_
&&
asset_store_
->
GetAsBuffer
(
name
,
data
));
}
...
...
content_handler/runtime_holder.h
浏览文件 @
9c1e4843
...
...
@@ -11,6 +11,7 @@
#include <unordered_set>
#include "dart-pkg/fuchsia/sdk_ext/fuchsia.h"
#include "flutter/assets/asset_provider.h"
#include "flutter/assets/directory_asset_bundle.h"
#include "flutter/assets/unzipper_provider.h"
#include "flutter/assets/zip_asset_store.h"
...
...
@@ -115,7 +116,7 @@ class RuntimeHolder : public blink::RuntimeDelegate,
std
::
vector
<
char
>
root_bundle_data_
;
// TODO(zarah): Remove asset_store_ when flx is completely removed
fxl
::
RefPtr
<
blink
::
ZipAssetStore
>
asset_store_
;
fxl
::
RefPtr
<
blink
::
DirectoryAssetBundle
>
directory_asset_bundle
_
;
fxl
::
RefPtr
<
blink
::
AssetProvider
>
asset_provider
_
;
void
*
dylib_handle_
=
nullptr
;
std
::
unique_ptr
<
Rasterizer
>
rasterizer_
;
std
::
unique_ptr
<
blink
::
RuntimeController
>
runtime_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录