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

Unified Diff: src/gpu/GrProcessor.cpp

Issue 1117443002: create GrTestUtils.h, move some common functions into it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrTestUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessor.cpp
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 1457bed7ba0324a5ceb17c20589845d2246e3ae1..9be9e4063ba2224982b197ef3bb7315a62c751c7 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -76,26 +76,6 @@ void GrProcessorTestFactory<GrXPFactory>::VerifyFactoryCount() {
#endif
-namespace GrProcessorUnitTest {
-const SkMatrix& TestMatrix(SkRandom* random) {
- static SkMatrix gMatrices[5];
- static bool gOnce;
- if (!gOnce) {
- gMatrices[0].reset();
- gMatrices[1].setTranslate(SkIntToScalar(-100), SkIntToScalar(100));
- gMatrices[2].setRotate(SkIntToScalar(17));
- gMatrices[3].setRotate(SkIntToScalar(185));
- gMatrices[3].postTranslate(SkIntToScalar(66), SkIntToScalar(-33));
- gMatrices[3].postScale(SkIntToScalar(2), SK_ScalarHalf);
- gMatrices[4].setRotate(SkIntToScalar(215));
- gMatrices[4].set(SkMatrix::kMPersp0, 0.00013f);
- gMatrices[4].set(SkMatrix::kMPersp1, -0.000039f);
- gOnce = true;
- }
- return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))];
-}
-}
-
// We use a global pool protected by a mutex(spinlock). Chrome may use the same GrContext on
// different threads. The GrContext is not used concurrently on different threads and there is a
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrTestUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698