Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
2e884389
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,发现更多精彩内容 >>
提交
2e884389
编写于
8月 07, 2015
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #515 from abarth/remove_mimic_flicker
Remove the flicker from MimicOverlay
上级
e9c05665
32c225e1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
26 deletion
+29
-26
sky/packages/sky/lib/widgets/framework.dart
sky/packages/sky/lib/widgets/framework.dart
+27
-25
sky/packages/sky/lib/widgets/mimic_overlay.dart
sky/packages/sky/lib/widgets/mimic_overlay.dart
+2
-1
未找到文件。
sky/packages/sky/lib/widgets/framework.dart
浏览文件 @
2e884389
...
...
@@ -116,7 +116,7 @@ abstract class GlobalKey extends Key {
}
static
void
_notifyListeners
()
{
assert
(!
_in
Render
DirtyComponents
);
assert
(!
_in
Build
DirtyComponents
);
assert
(!
Widget
.
_notifyingMountStatus
);
assert
(
_debugDuplicates
.
isEmpty
);
_notifyingListeners
=
true
;
...
...
@@ -161,7 +161,7 @@ abstract class Widget {
}
// you should not build the UI tree ahead of time, build it only during build()
bool
_isConstructedDuringBuild
()
=>
this
is
AbstractWidgetRoot
||
this
is
App
||
_in
Render
DirtyComponents
||
_inLayoutCallbackBuilder
>
0
;
bool
_isConstructedDuringBuild
()
=>
this
is
AbstractWidgetRoot
||
this
is
App
||
_in
Build
DirtyComponents
||
_inLayoutCallbackBuilder
>
0
;
Key
_key
;
...
...
@@ -755,7 +755,7 @@ abstract class StatefulComponent extends Component {
Set
<
Component
>
_dirtyComponents
=
new
Set
<
Component
>();
bool
_buildScheduled
=
false
;
bool
_in
Render
DirtyComponents
=
false
;
bool
_in
Build
DirtyComponents
=
false
;
int
_inLayoutCallbackBuilder
=
0
;
class
LayoutCallbackBuilderHandle
{
bool
_active
=
true
;
}
...
...
@@ -793,31 +793,33 @@ void _buildDirtyComponents() {
if
(
_shouldLogRenderDuration
)
sw
=
new
Stopwatch
()..
start
();
_inRenderDirtyComponents
=
true
;
try
{
sky
.
tracing
.
begin
(
'Component.flushBuild'
);
List
<
Component
>
sortedDirtyComponents
=
new
List
<
Component
>();
_absorbDirtyComponents
(
sortedDirtyComponents
);
int
index
=
0
;
while
(
index
<
sortedDirtyComponents
.
length
)
{
Component
component
=
sortedDirtyComponents
[
index
];
component
.
_buildIfDirty
();
if
(
_dirtyComponents
.
length
>
0
)
{
// the following assert verifies that we're not rebuilding anyone twice in one frame
assert
(
_dirtyComponents
.
every
((
Component
component
)
=>
!
sortedDirtyComponents
.
contains
(
component
)));
_absorbDirtyComponents
(
sortedDirtyComponents
);
index
=
0
;
}
else
{
index
+=
1
;
while
(!
_dirtyComponents
.
isEmpty
)
{
_inBuildDirtyComponents
=
true
;
try
{
sky
.
tracing
.
begin
(
'Component.flushBuild'
);
List
<
Component
>
sortedDirtyComponents
=
new
List
<
Component
>();
_absorbDirtyComponents
(
sortedDirtyComponents
);
int
index
=
0
;
while
(
index
<
sortedDirtyComponents
.
length
)
{
Component
component
=
sortedDirtyComponents
[
index
];
component
.
_buildIfDirty
();
if
(
_dirtyComponents
.
length
>
0
)
{
// the following assert verifies that we're not rebuilding anyone twice in one frame
assert
(
_dirtyComponents
.
every
((
Component
component
)
=>
!
sortedDirtyComponents
.
contains
(
component
)));
_absorbDirtyComponents
(
sortedDirtyComponents
);
index
=
0
;
}
else
{
index
+=
1
;
}
}
}
finally
{
_buildScheduled
=
false
;
_inBuildDirtyComponents
=
false
;
sky
.
tracing
.
end
(
'Component.flushBuild'
);
}
}
finally
{
_buildScheduled
=
false
;
_inRenderDirtyComponents
=
false
;
sky
.
tracing
.
end
(
'Component.flushBuild'
);
}
Widget
.
_notifyMountStatusChanged
();
Widget
.
_notifyMountStatusChanged
();
}
if
(
_shouldLogRenderDuration
)
{
sw
.
stop
();
...
...
sky/packages/sky/lib/widgets/mimic_overlay.dart
浏览文件 @
2e884389
...
...
@@ -70,8 +70,9 @@ class MimicOverlay extends AnimatedComponent {
setState
(()
{
// TODO(abarth): We need to convert global bounds into local coordinates.
_mimicBounds
.
begin
=
globalToLocal
(
globalBounds
.
topLeft
)
&
globalBounds
.
size
;
_
expandPerformance
.
forward
()
;
_
mimicBounds
.
value
=
_mimicBounds
.
begin
;
});
_expandPerformance
.
forward
();
}
Widget
build
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录