@@ -159,6 +159,23 @@ TEST_P(MatrixFilterContentsTest,
159159 Rect::MakeXYWH (200 , 400 , 100 , 100 ));
160160}
161161
162+ TEST_P (MatrixFilterContentsTest, RenderCoverageMatchesGetCoverageScale) {
163+ std::shared_ptr<Texture> texture = MakeTexture (ISize (100 , 100 ));
164+ MatrixFilterContents contents;
165+ contents.SetInputs ({FilterInput::Make (texture)});
166+ contents.SetMatrix (Matrix::MakeScale ({3 , 3 , 1 }));
167+ contents.SetEffectTransform (Matrix::MakeScale ({2 , 2 , 1 }));
168+
169+ Entity entity;
170+ entity.SetTransform (Matrix::MakeTranslation ({100 , 200 , 0 }));
171+
172+ std::shared_ptr<ContentContext> renderer = GetContentContext ();
173+ std::optional<Entity> result =
174+ contents.GetEntity (*renderer, entity, /* coverage_hint=*/ {});
175+ expectRenderCoverageEqual (result, contents.GetCoverage (entity),
176+ Rect::MakeXYWH (100 , 200 , 300 , 300 ));
177+ }
178+
162179TEST_P (MatrixFilterContentsTest, RenderCoverageMatchesGetCoverageSubpassScale) {
163180 std::shared_ptr<Texture> texture = MakeTexture (ISize (100 , 100 ));
164181 MatrixFilterContents contents;
@@ -174,7 +191,7 @@ TEST_P(MatrixFilterContentsTest, RenderCoverageMatchesGetCoverageSubpassScale) {
174191 std::optional<Entity> result =
175192 contents.GetEntity (*renderer, entity, /* coverage_hint=*/ {});
176193 expectRenderCoverageEqual (result, contents.GetCoverage (entity),
177- Rect::MakeXYWH (300 , 600 , 300 , 300 ));
194+ Rect::MakeXYWH (100 , 200 , 300 , 300 ));
178195}
179196
180197} // namespace testing
0 commit comments