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 <michaelludwig@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
8ed8081e0c
commit
785a3262d1
@ -37,9 +37,6 @@ private:
|
||||
|
||||
std::unique_ptr<GrFragmentProcessor> GrMatrixEffect::Make(
|
||||
const SkMatrix& matrix, std::unique_ptr<GrFragmentProcessor> child) {
|
||||
if (matrix.isIdentity()) {
|
||||
return child;
|
||||
}
|
||||
if (child->classID() == kGrMatrixEffect_ClassID) {
|
||||
auto me = static_cast<GrMatrixEffect*>(child.get());
|
||||
// registerChild's sample usage records whether the matrix used has perspective or not,
|
||||
|
Loading…
Reference in New Issue
Block a user