Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
800d817b
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,发现更多精彩内容 >>
提交
800d817b
编写于
6月 12, 2017
作者:
C
Chinmay Garde
提交者:
GitHub
6月 12, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Forward frame construction time to the compositor context. (#3765)
上级
0b24568e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
6 deletion
+14
-6
content_handler/runtime_holder.cc
content_handler/runtime_holder.cc
+4
-1
content_handler/runtime_holder.h
content_handler/runtime_holder.h
+1
-0
content_handler/software_rasterizer.cc
content_handler/software_rasterizer.cc
+4
-2
content_handler/vulkan_rasterizer.cc
content_handler/vulkan_rasterizer.cc
+5
-3
未找到文件。
content_handler/runtime_holder.cc
浏览文件 @
800d817b
...
...
@@ -270,6 +270,8 @@ void RuntimeHolder::Render(std::unique_ptr<flow::LayerTree> layer_tree) {
return
;
// Only draw once per frame.
is_ready_to_draw_
=
false
;
layer_tree
->
set_construction_time
(
ftl
::
TimePoint
::
Now
()
-
last_begin_frame_time_
);
layer_tree
->
set_frame_size
(
SkISize
::
Make
(
viewport_metrics_
.
physical_width
,
viewport_metrics_
.
physical_height
));
layer_tree
->
set_scene_version
(
scene_version_
);
...
...
@@ -647,7 +649,8 @@ void RuntimeHolder::BeginFrame() {
FTL_DCHECK
(
!
is_ready_to_draw_
);
is_ready_to_draw_
=
true
;
runtime_
->
BeginFrame
(
ftl
::
TimePoint
::
Now
());
last_begin_frame_time_
=
ftl
::
TimePoint
::
Now
();
runtime_
->
BeginFrame
(
last_begin_frame_time_
);
const
bool
was_ready_to_draw
=
is_ready_to_draw_
;
is_ready_to_draw_
=
false
;
...
...
content_handler/runtime_holder.h
浏览文件 @
800d817b
...
...
@@ -118,6 +118,7 @@ class RuntimeHolder : public blink::RuntimeDelegate,
mozart
::
InputMethodEditorPtr
input_method_editor_
;
fidl
::
Binding
<
mozart
::
InputMethodEditorClient
>
text_input_binding_
;
int
current_text_input_client_
=
0
;
ftl
::
TimePoint
last_begin_frame_time_
;
ftl
::
WeakPtrFactory
<
RuntimeHolder
>
weak_factory_
;
...
...
content_handler/software_rasterizer.cc
浏览文件 @
800d817b
...
...
@@ -40,6 +40,8 @@ void SoftwareRasterizer::Draw(std::unique_ptr<flow::LayerTree> layer_tree,
return
;
}
compositor_context_
.
engine_time
().
SetLapTime
(
layer_tree
->
construction_time
());
const
SkISize
&
frame_size
=
layer_tree
->
frame_size
();
auto
update
=
mozart
::
SceneUpdate
::
New
();
...
...
@@ -59,8 +61,8 @@ void SoftwareRasterizer::Draw(std::unique_ptr<flow::LayerTree> layer_tree,
return
;
}
flow
::
CompositorContext
::
ScopedFrame
frame
=
compositor_context_
.
AcquireFrame
(
nullptr
,
nullptr
);
flow
::
CompositorContext
::
ScopedFrame
frame
=
compositor_context_
.
AcquireFrame
(
nullptr
,
nullptr
,
true
/* instrumentation enabled */
);
layer_tree
->
Preroll
(
frame
);
...
...
content_handler/vulkan_rasterizer.cc
浏览文件 @
800d817b
...
...
@@ -53,7 +53,7 @@ VulkanRasterizer::VulkanSurfaceProducer::VulkanSurfaceProducer() {
}
VulkanRasterizer
::
VulkanSurfaceProducer
::~
VulkanSurfaceProducer
()
{
for
(
auto
&
surface_info
:
pending_surfaces_
)
for
(
auto
&
surface_info
:
pending_surfaces_
)
mtl
::
MessageLoop
::
GetCurrent
()
->
RemoveHandler
(
surface_info
.
second
.
handler_key
);
}
...
...
@@ -442,6 +442,8 @@ bool VulkanRasterizer::Draw(std::unique_ptr<flow::LayerTree> layer_tree) {
return
false
;
}
compositor_context_
.
engine_time
().
SetLapTime
(
layer_tree
->
construction_time
());
const
SkISize
&
frame_size
=
layer_tree
->
frame_size
();
auto
update
=
mozart
::
SceneUpdate
::
New
();
...
...
@@ -462,8 +464,8 @@ bool VulkanRasterizer::Draw(std::unique_ptr<flow::LayerTree> layer_tree) {
return
false
;
}
flow
::
CompositorContext
::
ScopedFrame
frame
=
compositor_context_
.
AcquireFrame
(
nullptr
,
nullptr
);
flow
::
CompositorContext
::
ScopedFrame
frame
=
compositor_context_
.
AcquireFrame
(
nullptr
,
nullptr
,
true
/* instrumentation enabled */
);
layer_tree
->
Preroll
(
frame
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录