@@ -36,10 +36,10 @@ TEST(MutatorsStack, CopyAndUpdateTheCopy) {
3636 ASSERT_TRUE (copy.is_empty ());
3737 ASSERT_TRUE (!stack.is_empty ());
3838 auto iter = stack.Bottom ();
39- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::clip_rrect );
39+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kClipRRect );
4040 ASSERT_TRUE (iter->get ()->GetRRect () == rrect);
4141 ++iter;
42- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::clip_rect );
42+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kClipRect );
4343 ASSERT_TRUE (iter->get ()->GetRect () == rect);
4444}
4545
@@ -48,7 +48,7 @@ TEST(MutatorsStack, PushClipRect) {
4848 auto rect = SkRect::MakeEmpty ();
4949 stack.PushClipRect (rect);
5050 auto iter = stack.Bottom ();
51- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::clip_rect );
51+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kClipRect );
5252 ASSERT_TRUE (iter->get ()->GetRect () == rect);
5353}
5454
@@ -57,7 +57,7 @@ TEST(MutatorsStack, PushClipRRect) {
5757 auto rrect = SkRRect::MakeEmpty ();
5858 stack.PushClipRRect (rrect);
5959 auto iter = stack.Bottom ();
60- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::clip_rrect );
60+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kClipRRect );
6161 ASSERT_TRUE (iter->get ()->GetRRect () == rrect);
6262}
6363
@@ -66,7 +66,7 @@ TEST(MutatorsStack, PushClipPath) {
6666 SkPath path;
6767 stack.PushClipPath (path);
6868 auto iter = stack.Bottom ();
69- ASSERT_TRUE (iter->get ()->GetType () == flutter::MutatorType::clip_path );
69+ ASSERT_TRUE (iter->get ()->GetType () == flutter::MutatorType::kClipPath );
7070 ASSERT_TRUE (iter->get ()->GetPath () == path);
7171}
7272
@@ -76,7 +76,7 @@ TEST(MutatorsStack, PushTransform) {
7676 matrix.setIdentity ();
7777 stack.PushTransform (matrix);
7878 auto iter = stack.Bottom ();
79- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::transform );
79+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kTransform );
8080 ASSERT_TRUE (iter->get ()->GetMatrix () == matrix);
8181}
8282
@@ -85,10 +85,19 @@ TEST(MutatorsStack, PushOpacity) {
8585 int alpha = 240 ;
8686 stack.PushOpacity (alpha);
8787 auto iter = stack.Bottom ();
88- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::opacity );
88+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kOpacity );
8989 ASSERT_TRUE (iter->get ()->GetAlpha () == 240 );
9090}
9191
92+ TEST (MutatorsStack, PushBackdropFilter) {
93+ MutatorsStack stack;
94+ auto filter = DlBlurImageFilter (5 , 5 , DlTileMode::kClamp );
95+ stack.PushBackdropFilter (filter);
96+ auto iter = stack.Bottom ();
97+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kBackdropFilter );
98+ ASSERT_TRUE (iter->get ()->GetFilter () == filter);
99+ }
100+
92101TEST (MutatorsStack, Pop) {
93102 MutatorsStack stack;
94103 SkMatrix matrix;
@@ -113,15 +122,15 @@ TEST(MutatorsStack, Traversal) {
113122 while (iter != stack.Top ()) {
114123 switch (index) {
115124 case 0 :
116- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::clip_rrect );
125+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kClipRRect );
117126 ASSERT_TRUE (iter->get ()->GetRRect () == rrect);
118127 break ;
119128 case 1 :
120- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::clip_rect );
129+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kClipRect );
121130 ASSERT_TRUE (iter->get ()->GetRect () == rect);
122131 break ;
123132 case 2 :
124- ASSERT_TRUE (iter->get ()->GetType () == MutatorType::transform );
133+ ASSERT_TRUE (iter->get ()->GetType () == MutatorType::kTransform );
125134 ASSERT_TRUE (iter->get ()->GetMatrix () == matrix);
126135 break ;
127136 default :
@@ -163,28 +172,28 @@ TEST(MutatorsStack, Equality) {
163172TEST (Mutator, Initialization) {
164173 SkRect rect = SkRect::MakeEmpty ();
165174 Mutator mutator = Mutator (rect);
166- ASSERT_TRUE (mutator.GetType () == MutatorType::clip_rect );
175+ ASSERT_TRUE (mutator.GetType () == MutatorType::kClipRect );
167176 ASSERT_TRUE (mutator.GetRect () == rect);
168177
169178 SkRRect rrect = SkRRect::MakeEmpty ();
170179 Mutator mutator2 = Mutator (rrect);
171- ASSERT_TRUE (mutator2.GetType () == MutatorType::clip_rrect );
180+ ASSERT_TRUE (mutator2.GetType () == MutatorType::kClipRRect );
172181 ASSERT_TRUE (mutator2.GetRRect () == rrect);
173182
174183 SkPath path;
175184 Mutator mutator3 = Mutator (path);
176- ASSERT_TRUE (mutator3.GetType () == MutatorType::clip_path );
185+ ASSERT_TRUE (mutator3.GetType () == MutatorType::kClipPath );
177186 ASSERT_TRUE (mutator3.GetPath () == path);
178187
179188 SkMatrix matrix;
180189 matrix.setIdentity ();
181190 Mutator mutator4 = Mutator (matrix);
182- ASSERT_TRUE (mutator4.GetType () == MutatorType::transform );
191+ ASSERT_TRUE (mutator4.GetType () == MutatorType::kTransform );
183192 ASSERT_TRUE (mutator4.GetMatrix () == matrix);
184193
185194 int alpha = 240 ;
186195 Mutator mutator5 = Mutator (alpha);
187- ASSERT_TRUE (mutator5.GetType () == MutatorType::opacity );
196+ ASSERT_TRUE (mutator5.GetType () == MutatorType::kOpacity );
188197}
189198
190199TEST (Mutator, CopyConstructor) {
0 commit comments