Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: src/gpu/GrTestUtils.cpp

Issue 1127183006: tesselating path renderer unit tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« src/gpu/GrTessellatingPathRenderer.cpp ('K') | « src/gpu/GrTessellatingPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698