Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
3b4093e1
Commit
3b4093e1
authored
Jul 28, 2015
by
Matt Perry
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into performance
parents
09dc3929
f4750a7d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
9 deletions
+75
-9
BUILD.gn
packages/flutter/example/game/BUILD.gn
+2
-0
Info.plist
packages/flutter/example/game/ios/Info.plist
+52
-0
sky_binding.dart
packages/flutter/lib/rendering/sky_binding.dart
+2
-2
widget.dart
packages/flutter/lib/widgets/widget.dart
+19
-7
No files found.
packages/flutter/example/game/BUILD.gn
View file @
3b4093e1
...
...
@@ -14,5 +14,7 @@ sky_app("game") {
deps = [
"//sky/packages/sky/example/game/apk:resources",
]
} else if (is_ios) {
info_plist = "ios/Info.plist"
}
}
packages/flutter/example/game/ios/Info.plist
0 → 100644
View file @
3b4093e1
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
!--
This
e
x
ec
ut
ab
l
e
n
a
m
e
must
m
a
t
c
h
th
e
n
a
m
e
o
f
th
e a
pp
provi
ded
to
th
e
ios_
a
pp
GN
t
e
mpl
a
t
e
--
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
game_app
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.domokit.sky.game
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
game_app
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
DTPlatformName
<
/k
e
y
>
<
string
>
iphonesimulator
<
/string
>
<
k
e
y
>
DTSDKName
<
/k
e
y
>
<
string
>
iphonesimulator8.3
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
MinimumOSVersion
<
/k
e
y
>
<
string
>
8.3
<
/string
>
<
k
e
y
>
UIDeviceFamily
<
/k
e
y
>
<
a
rr
a
y
>
<
int
e
g
e
r
>
1
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
2
<
/int
e
g
e
r
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleSupportedPlatforms
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
iPhoneSimulator
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
packages/flutter/lib/rendering/sky_binding.dart
View file @
3b4093e1
...
...
@@ -47,7 +47,7 @@ class SkyBinding {
_renderView
=
renderViewOverride
;
}
assert
(
_renderView
!=
null
);
scheduler
.
addPersistentFrameCallback
(
_
beginFrame
);
scheduler
.
addPersistentFrameCallback
(
beginFrame
);
assert
(
_instance
==
this
);
}
...
...
@@ -69,7 +69,7 @@ class SkyBinding {
void
set
root
(
RenderBox
value
)
{
_renderView
.
child
=
value
;
}
void
_
beginFrame
(
double
timeStamp
)
{
void
beginFrame
(
double
timeStamp
)
{
RenderObject
.
flushLayout
();
RenderObject
.
flushPaint
();
_renderView
.
paintFrame
();
...
...
packages/flutter/lib/widgets/widget.dart
View file @
3b4093e1
...
...
@@ -7,6 +7,7 @@ import 'dart:collection';
import
'dart:sky'
as
sky
;
import
'package:sky/base/hit_test.dart'
;
import
'package:sky/base/scheduler.dart'
as
scheduler
;
import
'package:sky/mojo/activity.dart'
as
activity
;
import
'package:sky/rendering/box.dart'
;
import
'package:sky/rendering/object.dart'
;
...
...
@@ -651,6 +652,11 @@ abstract class Component extends Widget {
_scheduleComponentForRender
(
this
);
}
static
void
flushBuild
()
{
if
(!
_dirtyComponents
.
isEmpty
)
_buildDirtyComponents
();
}
Widget
build
();
}
...
...
@@ -759,13 +765,15 @@ void _absorbDirtyComponents(List<Component> list) {
}
void
_buildDirtyComponents
(
)
{
assert
(!
_dirtyComponents
.
isEmpty
);
Stopwatch
sw
;
if
(
_shouldLogRenderDuration
)
sw
=
new
Stopwatch
()..
start
();
_inRenderDirtyComponents
=
true
;
try
{
sky
.
tracing
.
begin
(
'
Widgets._buildDirtyComponents
'
);
sky
.
tracing
.
begin
(
'
Component.flushBuild
'
);
List
<
Component
>
sortedDirtyComponents
=
new
List
<
Component
>();
_absorbDirtyComponents
(
sortedDirtyComponents
);
int
index
=
0
;
...
...
@@ -784,7 +792,7 @@ void _buildDirtyComponents() {
}
finally
{
_buildScheduled
=
false
;
_inRenderDirtyComponents
=
false
;
sky
.
tracing
.
end
(
'
Widgets._buildDirtyComponents
'
);
sky
.
tracing
.
end
(
'
Component.flushBuild
'
);
}
Widget
.
_notifyMountStatusChanged
();
...
...
@@ -795,21 +803,20 @@ void _buildDirtyComponents() {
if
(
_debugFrameTimes
.
length
>=
1000
)
{
_debugFrameTimes
.
sort
();
const
int
i
=
99
;
print
(
'
_buildDirtyComponents
:
${i+1}
th fastest frame out of the last
${_debugFrameTimes.length}
:
${_debugFrameTimes[i]}
microseconds'
);
print
(
'
Component.flushBuild
:
${i+1}
th fastest frame out of the last
${_debugFrameTimes.length}
:
${_debugFrameTimes[i]}
microseconds'
);
_debugFrameTimes
.
clear
();
}
}
}
void
_scheduleComponentForRender
(
Component
c
)
{
_dirtyComponents
.
add
(
c
);
void
_scheduleComponentForRender
(
Component
c
omponent
)
{
_dirtyComponents
.
add
(
c
omponent
);
if
(!
_buildScheduled
)
{
_buildScheduled
=
true
;
new
Future
.
microtask
(
_buildDirtyComponents
);
scheduler
.
ensureVisualUpdate
(
);
}
}
// RenderObjectWrappers correspond to a desired state of a RenderObject.
// They are fully immutable, with one exception: A Widget which is a
// Component which lives within an MultiChildRenderObjectWrapper's
...
...
@@ -1178,6 +1185,11 @@ class WidgetSkyBinding extends SkyBinding {
}
}
void
beginFrame
(
double
timeStamp
)
{
Component
.
flushBuild
();
super
.
beginFrame
(
timeStamp
);
}
}
abstract
class
App
extends
StatefulComponent
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment