Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
liujiuri
engine
提交
ee55c836
E
engine
项目概览
liujiuri
/
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,发现更多精彩内容 >>
提交
ee55c836
编写于
12月 04, 2015
作者:
C
Chinmay Garde
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add startup trace events
上级
40bda436
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
5 deletion
+21
-5
sky/shell/platform/ios/sky_app_delegate.mm
sky/shell/platform/ios/sky_app_delegate.mm
+2
-0
sky/shell/platform/ios/sky_surface.mm
sky/shell/platform/ios/sky_surface.mm
+6
-0
sky/shell/shell.cc
sky/shell/shell.cc
+3
-1
sky/shell/ui/engine.cc
sky/shell/ui/engine.cc
+10
-4
未找到文件。
sky/shell/platform/ios/sky_app_delegate.mm
浏览文件 @
ee55c836
...
...
@@ -4,11 +4,13 @@
#import "sky_app_delegate.h"
#import "sky_view_controller.h"
#import "base/trace_event/trace_event.h"
@implementation
SkyAppDelegate
-
(
BOOL
)
application
:(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:(
NSDictionary
*
)
launchOptions
{
TRACE_EVENT0
(
"flutter"
,
"applicationDidFinishLaunchingWithOptions"
);
CGRect
frame
=
[
UIScreen
mainScreen
].
bounds
;
UIWindow
*
window
=
[[
UIWindow
alloc
]
initWithFrame
:
frame
];
...
...
sky/shell/platform/ios/sky_surface.mm
浏览文件 @
ee55c836
...
...
@@ -9,6 +9,7 @@
#import <OpenGLES/EAGLDrawable.h>
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "sky/services/engine/input_event.mojom.h"
#include "sky/services/pointer/pointer.mojom.h"
...
...
@@ -100,6 +101,7 @@ static std::string TracesBasePath() {
}
-
(
instancetype
)
initWithShellView
:(
sky
::
shell
::
ShellView
*
)
shellView
{
TRACE_EVENT0
(
"flutter"
,
"initWithShellView"
);
self
=
[
super
init
];
if
(
self
)
{
base
::
FilePath
tracesPath
=
...
...
@@ -119,6 +121,7 @@ static std::string TracesBasePath() {
}
-
(
void
)
layoutSubviews
{
TRACE_EVENT0
(
"flutter"
,
"layoutSubviews"
);
[
super
layoutSubviews
];
[
self
configureLayerDefaults
];
...
...
@@ -166,6 +169,7 @@ static std::string TracesBasePath() {
}
-
(
void
)
notifySurfaceCreation
{
TRACE_EVENT0
(
"flutter"
,
"notifySurfaceCreation"
);
self
.
platformView
->
SurfaceCreated
(
self
.
acceleratedWidget
);
}
...
...
@@ -185,6 +189,7 @@ static std::string TracesBasePath() {
}
-
(
void
)
connectToEngineAndLoad
{
TRACE_EVENT0
(
"flutter"
,
"connectToEngineAndLoad"
);
self
.
platformView
->
ConnectToEngine
(
mojo
::
GetProxy
(
&
_sky_engine
));
mojo
::
ServiceProviderPtr
service_provider
;
...
...
@@ -198,6 +203,7 @@ static std::string TracesBasePath() {
}
-
(
void
)
notifySurfaceDestruction
{
TRACE_EVENT0
(
"flutter"
,
"notifySurfaceDestruction"
);
self
.
platformView
->
SurfaceDestroyed
();
}
...
...
sky/shell/shell.cc
浏览文件 @
ee55c836
...
...
@@ -13,9 +13,10 @@
#include "base/memory/discardable_memory.h"
#include "base/memory/discardable_memory_allocator.h"
#include "base/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "mojo/message_pump/message_pump_mojo.h"
#include "sky/shell/ui/engine.h"
#include "sky/shell/switches.h"
#include "sky/shell/ui/engine.h"
namespace
sky
{
namespace
shell
{
...
...
@@ -73,6 +74,7 @@ Shell::~Shell() {
}
void
Shell
::
InitStandalone
()
{
TRACE_EVENT0
(
"flutter"
,
"Shell::InitStandalone"
);
CHECK
(
base
::
i18n
::
InitializeICU
());
base
::
CommandLine
&
command_line
=
*
base
::
CommandLine
::
ForCurrentProcess
();
...
...
sky/shell/ui/engine.cc
浏览文件 @
ee55c836
...
...
@@ -31,9 +31,11 @@ namespace {
const
char
kSnapshotKey
[]
=
"snapshot_blob.bin"
;
void
Ignored
(
bool
)
{
TRACE_EVENT_ASYNC_END0
(
"flutter"
,
"AssetUnpackerJobFetch"
,
1
);
}
mojo
::
ScopedDataPipeConsumerHandle
Fetch
(
const
base
::
FilePath
&
path
)
{
TRACE_EVENT_ASYNC_BEGIN0
(
"flutter"
,
"AssetUnpackerJobFetch"
,
1
);
mojo
::
DataPipe
pipe
;
auto
runner
=
base
::
WorkerPool
::
GetTaskRunner
(
true
);
mojo
::
common
::
CopyFromFile
(
base
::
FilePath
(
path
),
pipe
.
producer_handle
.
Pass
(),
...
...
@@ -123,9 +125,11 @@ void Engine::SetServices(ServicesDataPtr services) {
#if defined(OS_ANDROID) || defined(OS_IOS)
vsync
::
VSyncProviderPtr
vsync_provider
;
if
(
services_
->
shell
)
{
mojo
::
ConnectToService
(
services_
->
shell
.
get
(),
"mojo:vsync"
,
&
vsync_provider
);
mojo
::
ConnectToService
(
services_
->
shell
.
get
(),
"mojo:vsync"
,
&
vsync_provider
);
}
else
{
mojo
::
ConnectToService
(
services_
->
services_provided_by_embedder
.
get
(),
&
vsync_provider
);
mojo
::
ConnectToService
(
services_
->
services_provided_by_embedder
.
get
(),
&
vsync_provider
);
}
animator_
->
set_vsync_provider
(
vsync_provider
.
Pass
());
#endif
...
...
@@ -159,6 +163,7 @@ void Engine::OnPointerPacket(pointer::PointerPacketPtr packet) {
}
void
Engine
::
RunFromLibrary
(
const
std
::
string
&
name
)
{
TRACE_EVENT0
(
"flutter"
,
"Engine::RunFromLibrary"
);
sky_view_
=
blink
::
SkyView
::
Create
(
this
);
sky_view_
->
CreateView
(
blink
::
WebString
::
fromUTF8
(
name
));
sky_view_
->
RunFromLibrary
(
blink
::
WebString
::
fromUTF8
(
name
),
...
...
@@ -172,7 +177,6 @@ void Engine::RunFromSnapshotStream(
const
std
::
string
&
name
,
mojo
::
ScopedDataPipeConsumerHandle
snapshot
)
{
TRACE_EVENT0
(
"flutter"
,
"Engine::RunFromSnapshotStream"
);
sky_view_
=
blink
::
SkyView
::
Create
(
this
);
sky_view_
->
CreateView
(
blink
::
WebString
::
fromUTF8
(
name
));
sky_view_
->
RunFromSnapshot
(
blink
::
WebString
::
fromUTF8
(
name
),
snapshot
.
Pass
());
...
...
@@ -182,6 +186,7 @@ void Engine::RunFromSnapshotStream(
}
void
Engine
::
RunFromPrecompiledSnapshot
(
const
mojo
::
String
&
bundle_path
)
{
TRACE_EVENT0
(
"flutter"
,
"Engine::RunFromPrecompiledSnapshot"
);
AssetUnpackerJob
*
unpacker
=
new
AssetUnpackerJob
(
mojo
::
GetProxy
(
&
root_bundle_
),
base
::
WorkerPool
::
GetTaskRunner
(
true
));
std
::
string
path_str
=
bundle_path
;
...
...
@@ -197,6 +202,7 @@ void Engine::RunFromPrecompiledSnapshot(const mojo::String& bundle_path) {
void
Engine
::
RunFromFile
(
const
mojo
::
String
&
main
,
const
mojo
::
String
&
package_root
)
{
TRACE_EVENT0
(
"flutter"
,
"Engine::RunFromFile"
);
std
::
string
package_root_str
=
package_root
;
dart_library_provider_
.
reset
(
new
DartLibraryProviderFiles
(
base
::
FilePath
(
package_root_str
)));
...
...
@@ -205,7 +211,6 @@ void Engine::RunFromFile(const mojo::String& main,
void
Engine
::
RunFromBundle
(
const
mojo
::
String
&
path
)
{
TRACE_EVENT0
(
"flutter"
,
"Engine::RunFromBundle"
);
AssetUnpackerJob
*
unpacker
=
new
AssetUnpackerJob
(
mojo
::
GetProxy
(
&
root_bundle_
),
base
::
WorkerPool
::
GetTaskRunner
(
true
));
std
::
string
path_str
=
path
;
...
...
@@ -217,6 +222,7 @@ void Engine::RunFromBundle(const mojo::String& path) {
void
Engine
::
RunFromAssetBundle
(
const
mojo
::
String
&
url
,
mojo
::
asset_bundle
::
AssetBundlePtr
bundle
)
{
TRACE_EVENT0
(
"flutter"
,
"Engine::RunFromAssetBundle"
);
std
::
string
url_str
=
url
;
root_bundle_
=
bundle
.
Pass
();
root_bundle_
->
GetAsStream
(
kSnapshotKey
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录