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
38542d28
Unverified
Commit
38542d28
authored
Apr 11, 2022
by
wangying
Committed by
GitHub
Apr 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some debug properties to BackdropFilterLayer (#101101)
parent
dacf3afe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+8
-1
layers_test.dart
packages/flutter/test/rendering/layers_test.dart
+8
-0
No files found.
packages/flutter/lib/src/rendering/layer.dart
View file @
38542d28
...
...
@@ -1897,7 +1897,7 @@ class ShaderMaskLayer extends ContainerLayer {
super
.
debugFillProperties
(
properties
);
properties
.
add
(
DiagnosticsProperty
<
Shader
>(
'shader'
,
shader
));
properties
.
add
(
DiagnosticsProperty
<
Rect
>(
'maskRect'
,
maskRect
));
properties
.
add
(
Diagnostics
Property
<
BlendMode
>(
'blendMode'
,
blendMode
));
properties
.
add
(
Enum
Property
<
BlendMode
>(
'blendMode'
,
blendMode
));
}
}
...
...
@@ -1956,6 +1956,13 @@ class BackdropFilterLayer extends ContainerLayer {
addChildrenToScene
(
builder
);
builder
.
pop
();
}
@override
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
super
.
debugFillProperties
(
properties
);
properties
.
add
(
DiagnosticsProperty
<
ui
.
ImageFilter
>(
'filter'
,
filter
));
properties
.
add
(
EnumProperty
<
BlendMode
>(
'blendMode'
,
blendMode
));
}
}
/// A composited layer that uses a physical model to producing lighting effects.
...
...
packages/flutter/test/rendering/layers_test.dart
View file @
38542d28
...
...
@@ -365,6 +365,14 @@ void main() {
);
});
test
(
'BackdropFilterLayer prints filter and blendMode in debug info'
,
()
{
final
ImageFilter
filter
=
ImageFilter
.
blur
(
sigmaX:
1.0
,
sigmaY:
1.0
,
tileMode:
TileMode
.
repeated
);
final
BackdropFilterLayer
layer
=
BackdropFilterLayer
(
filter:
filter
,
blendMode:
BlendMode
.
clear
);
final
List
<
String
>
info
=
_getDebugInfo
(
layer
);
expect
(
info
,
contains
(
isBrowser
?
'filter: ImageFilter.blur(1, 1, TileMode.repeated)'
:
'filter: ImageFilter.blur(1.0, 1.0, repeated)'
));
expect
(
info
,
contains
(
'blendMode: clear'
));
});
test
(
'PictureLayer prints picture, raster cache hints in debug info'
,
()
{
final
PictureRecorder
recorder
=
PictureRecorder
();
final
Canvas
canvas
=
Canvas
(
recorder
);
...
...
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