Chromium Code Reviews| Index: src/gpu/GrTestUtils.cpp |
| diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp |
| index 163fb56389ef1f6c308adc794d97bf8c6e41a7a3..00742e955ce29ab94ec5db5b90271cfa4127dc20 100644 |
| --- a/src/gpu/GrTestUtils.cpp |
| +++ b/src/gpu/GrTestUtils.cpp |
| @@ -83,6 +83,15 @@ const SkMatrix& TestMatrixRectStaysRect(SkRandom* random) { |
| return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; |
| } |
| +SkMatrix TestMatrixInvertible(SkRandom* random) { |
|
robertphillips
2015/05/07 16:59:29
Isn't this pretty much guaranteed to kill RVO?
|
| + SkMatrix result; |
| + SkMatrix dummy; |
| + do { |
| + result = TestMatrix(random); |
| + } while (!result.invert(&dummy)); |
| + return result; |
| +} |
| + |
| const SkRect& TestRect(SkRandom* random) { |
| static SkRect gRects[7]; |
| static bool gOnce; |