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
5ee721fe
Commit
5ee721fe
authored
Nov 06, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1995 from abarth/startup_assert
We throw an exception if you tap the screen during load
parents
5cf258c4
060b34f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+6
-2
box.dart
packages/flutter/lib/src/rendering/box.dart
+1
-0
binding.dart
packages/flutter/lib/src/widgets/binding.dart
+3
-2
No files found.
packages/flutter/lib/src/rendering/binding.dart
View file @
5ee721fe
...
...
@@ -144,7 +144,7 @@ class FlutterBinding extends HitTestTarget {
_renderView
=
renderViewOverride
;
}
assert
(
_renderView
!=
null
);
scheduler
.
addPersistentFrameCallback
(
beginFrame
);
scheduler
.
addPersistentFrameCallback
(
_handlePersistentFrameCallback
);
assert
(
_instance
==
this
);
}
...
...
@@ -172,8 +172,12 @@ class FlutterBinding extends HitTestTarget {
listener
(
size
);
}
void
_handlePersistentFrameCallback
(
Duration
timeStamp
)
{
beginFrame
();
}
/// Pump the rendering pipeline to generate a frame for the given time stamp
void
beginFrame
(
Duration
timeStamp
)
{
void
beginFrame
()
{
RenderObject
.
flushLayout
();
_renderView
.
updateCompositingBits
();
RenderObject
.
flushPaint
();
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
5ee721fe
...
...
@@ -544,6 +544,7 @@ abstract class RenderBox extends RenderObject {
/// coordinate space of the callee. The callee is responsible for checking
/// whether the given position is within its bounds.
bool
hitTest
(
HitTestResult
result
,
{
Point
position
})
{
assert
(!
needsLayout
);
if
(
position
.
x
>=
0.0
&&
position
.
x
<
_size
.
width
&&
position
.
y
>=
0.0
&&
position
.
y
<
_size
.
height
)
{
if
(
hitTestChildren
(
result
,
position:
position
)
||
hitTestSelf
(
position
))
{
...
...
packages/flutter/lib/src/widgets/binding.dart
View file @
5ee721fe
...
...
@@ -22,9 +22,9 @@ class WidgetFlutterBinding extends FlutterBinding {
static
WidgetFlutterBinding
get
instance
=>
FlutterBinding
.
instance
;
void
beginFrame
(
Duration
timeStamp
)
{
void
beginFrame
()
{
buildDirtyElements
();
super
.
beginFrame
(
timeStamp
);
super
.
beginFrame
();
Element
.
finalizeTree
();
}
...
...
@@ -74,6 +74,7 @@ class WidgetFlutterBinding extends FlutterBinding {
container:
renderView
,
child:
app
).
attachToRenderTree
(
_renderViewElement
);
beginFrame
();
}
}
...
...
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