From 785a3262d116b1874bc8a4a266ca84d5d99a01d6 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Tue, 13 Apr 2021 10:14:01 -0400 Subject: [PATCH] Don't elide GrMatrixEffect if matrix is identity. This ensures an effect setup code path that calls GrMatrix::Make() doesn't produce an identity and non-identity shader variant. Change-Id: I4d17395ed1b5bfd2bf9ceac68e85756c18eb2d2f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396018 Reviewed-by: Michael Ludwig Commit-Queue: Brian Salomon --- src/gpu/effects/GrMatrixEffect.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gpu/effects/GrMatrixEffect.cpp b/src/gpu/effects/GrMatrixEffect.cpp index 172691e3b0..2590e97a22 100644 --- a/src/gpu/effects/GrMatrixEffect.cpp +++ b/src/gpu/effects/GrMatrixEffect.cpp @@ -37,9 +37,6 @@ private: std::unique_ptr GrMatrixEffect::Make( const SkMatrix& matrix, std::unique_ptr child) { - if (matrix.isIdentity()) { - return child; - } if (child->classID() == kGrMatrixEffect_ClassID) { auto me = static_cast(child.get()); // registerChild's sample usage records whether the matrix used has perspective or not,