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
f0ebc2b0
Commit
f0ebc2b0
authored
Nov 10, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #279 from abarth/faster_layout
Make layout_bench.dart 19% faster
parents
8c98ea37
1d7cd6b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
object.dart
packages/flutter/lib/src/rendering/object.dart
+5
-4
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
f0ebc2b0
...
@@ -926,13 +926,15 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
...
@@ -926,13 +926,15 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
/// writes are coalesced, removing redundant computation.
/// writes are coalesced, removing redundant computation.
void
markNeedsPaint
()
{
void
markNeedsPaint
()
{
assert
(!
debugDoingPaint
);
assert
(!
debugDoingPaint
);
if
(!
attached
)
return
;
// Don't try painting things that aren't in the hierarchy
if
(!
attached
)
if
(
_needsPaint
)
return
;
return
;
// Don't try painting things that aren't in the hierarchy
if
(
_needsPaint
)
return
;
_needsPaint
=
true
;
if
(
hasLayer
)
{
if
(
hasLayer
)
{
// If we always have our own layer, then we can just repaint
// If we always have our own layer, then we can just repaint
// ourselves without involving any other nodes.
// ourselves without involving any other nodes.
assert
(
_layer
!=
null
);
assert
(
_layer
!=
null
);
_needsPaint
=
true
;
_nodesNeedingPaint
.
add
(
this
);
_nodesNeedingPaint
.
add
(
this
);
scheduler
.
ensureVisualUpdate
();
scheduler
.
ensureVisualUpdate
();
}
else
if
(
parent
is
RenderObject
)
{
}
else
if
(
parent
is
RenderObject
)
{
...
@@ -948,7 +950,6 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
...
@@ -948,7 +950,6 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
// then we have to paint ourselves, since nobody else can paint
// then we have to paint ourselves, since nobody else can paint
// us. We don't add ourselves to _nodesNeedingPaint in this
// us. We don't add ourselves to _nodesNeedingPaint in this
// case, because the root is always told to paint regardless.
// case, because the root is always told to paint regardless.
_needsPaint
=
true
;
scheduler
.
ensureVisualUpdate
();
scheduler
.
ensureVisualUpdate
();
}
}
}
}
...
...
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