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
062e0106
Commit
062e0106
authored
Nov 23, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #558 from abarth/compositing_offset
Fix upload of composited scene with non-zero offsets
parents
1a351a65
a35344f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+15
-11
No files found.
packages/flutter/lib/src/rendering/layer.dart
View file @
062e0106
...
...
@@ -140,7 +140,7 @@ class StatisticsLayer extends Layer {
void
addToScene
(
ui
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
assert
(
optionsMask
!=
null
);
builder
.
addStatistics
(
optionsMask
,
paintBounds
.
shift
(
layerOffset
));
builder
.
addStatistics
(
optionsMask
,
paintBounds
.
shift
(
offset
+
layerOffset
));
builder
.
setRasterizerTracingThreshold
(
rasterizerThreshold
);
}
}
...
...
@@ -231,10 +231,10 @@ class ContainerLayer extends Layer {
}
/// Uploads all of this layer's children to the engine
void
addChildrenToScene
(
ui
.
SceneBuilder
builder
,
Offset
layer
Offset
)
{
void
addChildrenToScene
(
ui
.
SceneBuilder
builder
,
Offset
child
Offset
)
{
Layer
child
=
_firstChild
;
while
(
child
!=
null
)
{
child
.
addToScene
(
builder
,
layer
Offset
);
child
.
addToScene
(
builder
,
child
Offset
);
child
=
child
.
nextSibling
;
}
}
...
...
@@ -268,8 +268,9 @@ class ClipRectLayer extends ContainerLayer {
// instead of in the coordinate system of this layer?
void
addToScene
(
ui
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
builder
.
pushClipRect
(
clipRect
.
shift
(
layerOffset
));
addChildrenToScene
(
builder
,
offset
+
layerOffset
);
Offset
childOffset
=
offset
+
layerOffset
;
builder
.
pushClipRect
(
clipRect
.
shift
(
childOffset
));
addChildrenToScene
(
builder
,
childOffset
);
builder
.
pop
();
}
...
...
@@ -293,8 +294,9 @@ class ClipRRectLayer extends ContainerLayer {
// instead of in the coordinate system of this layer?
void
addToScene
(
ui
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
builder
.
pushClipRRect
(
clipRRect
.
shift
(
layerOffset
),
bounds
.
shift
(
layerOffset
));
addChildrenToScene
(
builder
,
offset
+
layerOffset
);
Offset
childOffset
=
offset
+
layerOffset
;
builder
.
pushClipRRect
(
clipRRect
.
shift
(
childOffset
),
bounds
.
shift
(
childOffset
));
addChildrenToScene
(
builder
,
childOffset
);
builder
.
pop
();
}
...
...
@@ -319,8 +321,9 @@ class ClipPathLayer extends ContainerLayer {
// in the coordinate system of this layer?
void
addToScene
(
ui
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
builder
.
pushClipPath
(
clipPath
.
shift
(
layerOffset
),
bounds
.
shift
(
layerOffset
));
addChildrenToScene
(
builder
,
offset
+
layerOffset
);
Offset
childOffset
=
offset
+
layerOffset
;
builder
.
pushClipPath
(
clipPath
.
shift
(
childOffset
),
bounds
.
shift
(
childOffset
));
addChildrenToScene
(
builder
,
childOffset
);
builder
.
pop
();
}
...
...
@@ -368,8 +371,9 @@ class OpacityLayer extends ContainerLayer {
int
alpha
;
void
addToScene
(
ui
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
builder
.
pushOpacity
(
alpha
,
bounds
?.
shift
(
layerOffset
));
addChildrenToScene
(
builder
,
offset
+
layerOffset
);
Offset
childOffset
=
offset
+
layerOffset
;
builder
.
pushOpacity
(
alpha
,
bounds
?.
shift
(
childOffset
));
addChildrenToScene
(
builder
,
childOffset
);
builder
.
pop
();
}
...
...
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