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
61a8132e
Unverified
Commit
61a8132e
authored
Jan 09, 2018
by
amirh
Committed by
GitHub
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Push physical layers with paths instead of rects in RenderPhysicalModel. (#13942)" (#13988)
This reverts commit
57b4a525
.
parent
57b4a525
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
engine.version
bin/internal/engine.version
+1
-1
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+8
-7
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+2
-3
No files found.
bin/internal/engine.version
View file @
61a8132e
d8740c70a58ada74aff5b773e2bec9d622c42a97
6a724f0d3e22d41246baf3447d7ba2c9ff886765
packages/flutter/lib/src/rendering/layer.dart
View file @
61a8132e
...
...
@@ -755,20 +755,20 @@ class PhysicalModelLayer extends ContainerLayer {
/// Creates a composited layer that uses a physical model to producing
/// lighting effects.
///
/// The [clip
Path
], [elevation], and [color] arguments must not be null.
/// The [clip
RRect
], [elevation], and [color] arguments must not be null.
PhysicalModelLayer
({
@required
this
.
clip
Path
,
@required
this
.
clip
RRect
,
@required
this
.
elevation
,
@required
this
.
color
,
})
:
assert
(
clip
Path
!=
null
),
})
:
assert
(
clip
RRect
!=
null
),
assert
(
elevation
!=
null
),
assert
(
color
!=
null
);
/// The
path
to clip in the parent's coordinate system.
/// The
rounded-rect
to clip in the parent's coordinate system.
///
/// The scene must be explicitly recomposited after this property is changed
/// (as described at [Layer]).
Path
clipPath
;
RRect
clipRRect
;
/// The z-coordinate at which to place this physical object.
///
...
...
@@ -784,8 +784,8 @@ class PhysicalModelLayer extends ContainerLayer {
@override
void
addToScene
(
ui
.
SceneBuilder
builder
,
Offset
layerOffset
)
{
builder
.
pushPhysical
Shape
(
path:
clipPath
.
shift
(
layerOffset
),
builder
.
pushPhysical
Model
(
rrect:
clipRRect
.
shift
(
layerOffset
),
elevation:
elevation
,
color:
color
,
);
...
...
@@ -796,6 +796,7 @@ class PhysicalModelLayer extends ContainerLayer {
@override
void
debugFillProperties
(
DiagnosticPropertiesBuilder
description
)
{
super
.
debugFillProperties
(
description
);
description
.
add
(
new
DiagnosticsProperty
<
RRect
>(
'clipRRect'
,
clipRRect
));
description
.
add
(
new
DoubleProperty
(
'elevation'
,
elevation
));
description
.
add
(
new
DiagnosticsProperty
<
Color
>(
'color'
,
color
));
}
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
61a8132e
...
...
@@ -1426,10 +1426,9 @@ class RenderPhysicalModel extends _RenderCustomClip<RRect> {
_updateClip
();
final
RRect
offsetClipRRect
=
_clip
.
shift
(
offset
);
final
Rect
offsetBounds
=
offsetClipRRect
.
outerRect
;
final
Path
offsetClipPath
=
new
Path
()..
addRRect
(
offsetClipRRect
);
if
(
needsCompositing
)
{
final
PhysicalModelLayer
physicalModel
=
new
PhysicalModelLayer
(
clip
Path:
offsetClipPath
,
clip
RRect:
offsetClipRRect
,
elevation:
elevation
,
color:
color
,
);
...
...
@@ -1446,7 +1445,7 @@ class RenderPhysicalModel extends _RenderCustomClip<RRect> {
_transparentPaint
,
);
canvas
.
drawShadow
(
offsetClipPath
,
new
Path
()..
addRRect
(
offsetClipRRect
)
,
shadowColor
,
elevation
,
color
.
alpha
!=
0xFF
,
...
...
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