Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix attempt 2
  • Loading branch information
gaaclarke committed May 17, 2024
commit 49b23cb5862c06ff7e039501ce3644c4c866f49a
20 changes: 14 additions & 6 deletions impeller/entity/contents/filters/matrix_filter_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,22 @@ void MatrixFilterContents::SetSamplerDescriptor(SamplerDescriptor desc) {
}

namespace {
Matrix CalculateSubpassTransform(const Matrix& entity_transform,
Matrix CalculateSubpassTransform(const Matrix& snapshot_transform,
const Matrix& effect_transform,
const Matrix& matrix) {
Matrix effect_basis = effect_transform.Basis();
return entity_transform * //
effect_basis * //
matrix * //
effect_basis.Invert();
Scalar x = effect_transform.m[12];
Scalar y = effect_transform.m[13];
if (Point(x, y) == Point()) {
return snapshot_transform * //
effect_transform * //
matrix * //
effect_transform.Invert();
} else {
return effect_transform * //
matrix * //
effect_transform.Invert() * //
snapshot_transform;
}
}
} // namespace

Expand Down